I have the same problem as this answer: https://magento.stackexchange.com/a/255003/106058
But I can't comment on his answer directly so here I am.
I'm using Magento 2.3.3. I ran bin/magento setup:upgrade and got Unique constraint violation found after the Running data recurring... message. So, I ran bin/magento setup:db-data:upgrade and got this error message below:
Module 'Magento_Widget': Module 'Magento_SalesSequence': Running data recurring... In AbstractDb.php line 427: Unique constraint violation found In Mysql.php line 593: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'order-0' for key 'MG2_SALES_SEQUENCE_META_ENTITY_TYPE_STORE_ID', query was: INSE RT INTO `mg2_sales_sequence_meta` (`entity_type`, `store_id`, `sequence_table`) VALUES (?, ?, ?) In Mysql.php line 110: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'order-0' for key 'MG2_SALES_SEQUENCE_META_ENTITY_TYPE_STORE_ID', query was: INSE RT INTO `mg2_sales_sequence_meta` (`entity_type`, `store_id`, `sequence_table`) VALUES (?, ?, ?) In Mysql.php line 91: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'order-0' for key 'MG2_SALES_SEQUENCE_META_ENTITY_TYPE_STORE_ID' setup:db-data:upgrade [--magento-init-params MAGENTO-INIT-PARAMS] I tried deleting the existing records on the table (the error occurs only with the records where the store_id column is 0) but it still showed the same error message. I even tried dropping the sales_sequence_meta and sales_sequence_profile tables of the Sales Sequence module and reran the upgrade command. It re-created the tables but still got the same error message.
Any idea on how to solve this? Thank you!