Database Issue - Integrity constraint violation: 1062 Duplicate entry '4-Images' for key

Soo. having another issue…

Sites down displaying this issue.

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Meigee_Universal data: current version - none, required version - 2.5.5
WeltPixel_Backend data: current version - none, required version - 1.0.3
WeltPixel_Quickview data: current version - none, required version - 1.0.1

Exception #0 (Magento\Framework\Exception\LocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Meigee_Universal data: current version - none, required version - 2.5.5
WeltPixel_Backend data: current version - none, required version - 1.0.3
WeltPixel_Quickview data: current version - none, required version - 1.0.1
#1 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000001594ca2e0000000061dcca76#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73]
#2 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000001594cb890000000061dcca76#, &Closure#000000001594cbf60000000061dcca76#, &Magento\Framework\App\Request\Http#000000001594ca2e0000000061dcca76#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#3 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#000000001594ca2e0000000061dcca76#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#4 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#000000001594ca2e0000000061dcca76#), array(array('page_cache_from_...', 'storeCookieValid...', 'install', 'configHash'), array('front-controller...'), 'requestPreproces...')) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#5 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#000000001594ca2e0000000061dcca76#) called at [vendor/magento/framework/App/Http.php:137]
#6 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#7 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#8 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000001594ca500000000061dcca76#) called at [index.php:39]

But when I run bin/magento setup:upgrade i an faced with the following error.

Installing data... SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4-Images' for key 'EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME', query was: INSERT INTO `eav_attribute_group` (`attribute_set_id`, `attribute_group_name`, `sort_order`, `attribute_group_code`) VALUES (?, ?, ?, ?)

Any thoughts anyone?

Typically, the exception you’re seeing for “The following modules are outdated...” is when you install or update a module but don’t run bin/magento setup:upgrade afterwards.

Obviously you’re stuck in a state where you can’t execute the command to finalise the process. Based on the SQL Output, it would appear that you have a duplicate Attribute Set Name called “4-Images”.

My advice would be to Backup your Store/Database and manually remove the duplicate entry from the database. I think the duplicate entry for “4-Images” can be found in “eav_attribute_group” if I’m reading that correctly.

Once the duplicate entry has been removed, bin/magento setup:upgrade should run so long as there are no other issues waiting for you.