After move theme folder (app, pub, lib) to root folder then run php bin/magento setup:upgrade getting the following error,
> php bin/magento setup:upgrade
Installing data... SQLSTATE: Integrity constraint violation: 1062 Duplicate entry '21' for key 'PRIMARY', query was: INSERT INTO `eav_attribute_set` (`entity_type_id`, `attribute_set_name`, `sort_order`, `attribute_set_id`) VALUES (?, ?, ?, ?)
Kindly refer below url:
Follow steps mentioned within solution, it will help you to resolve issue.
If issue resolve, please click on 'Kudos' & Accept as Solution!
@Bhanu Periwal Here Duplicate entry 21 is my attribute_set_id Now what i need to do?
Please take backup of table or complete database first.
Edit that row, you will see there is more than 1 entry (comma separated) for same value (here 21), just remove all other duplicates values from there and save it.
Flush cache and re-run index command.
If error comes again then again (that may come for other products as well) check and fix in similar way.
If issue resolve, Please click on 'Kudos' & Accept as Solution!
@Bhanu Periwal Final stage error, could you pls help me. Thanks.