Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during bin/magento setup:upgrade #51

Open
michalzimniak opened this issue Apr 23, 2020 · 2 comments
Open

Error during bin/magento setup:upgrade #51

michalzimniak opened this issue Apr 23, 2020 · 2 comments

Comments

@michalzimniak
Copy link

Upgrading data... SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'allegro.api' for key 'queue.QUEUE_NAME', query was: INSERT INTO queue (name) VALUES (?)

@michalzimniak
Copy link
Author

michalzimniak commented Apr 24, 2020

More information:

Magento version: magento/product-community-edition": "2.3.4

# composer require macopedia/magento2-allegro
Using version ^4.0 for macopedia/magento2-allegro
./composer.json has been updated
...
# bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
XXXX/generated/code/Composer
XXXX/generated/code/Dotdigitalgroup
XXXX/generated/code/MSP
XXXX/generated/code/Magento
XXXX/generated/code/Symfony
XXXX/generated/code/Yotpo
The directory 'XXXX/generated/metadata/' doesn't exist - skipping cleanup
XXXX/pub/static/adminhtml
XXXX/pub/static/deployed_version.txt
XXXX/pub/static/frontend
XXXX/var/view_preprocessed/pub
Updating modules:
..
Schema creation/updates:
...
Data install/update:
Module 'Macopedia_Allegro':
Upgrading data... SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'allegro.api' for key 'queue.QUEUE_NAME', query was: INSERT INTO `queue` (`name`) VALUES (?)

@michalzimniak
Copy link
Author

michalzimniak commented Apr 28, 2020

Seems like delete those lines fixing the problem:

File: Setup/UpgradeData.php

Delete or comment lines:

 62           $this->resource->getConnection()	
 63               ->insert($this->resource->getTableName('queue'), ['name' => 'allegro.api']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant