- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I tried to run setup:upgrade to upgrade database schema but uncountered an error :
bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
/var/www/html/EBA/public_html/generated/code/Composer
/var/www/html/EBA/public_html/generated/code/Dotdigitalgroup
/var/www/html/EBA/public_html/generated/code/MSP
/var/www/html/EBA/public_html/generated/code/Magento
/var/www/html/EBA/public_html/generated/code/Symfony
/var/www/html/EBA/public_html/generated/code/Yotpo
Updating modules:
Schema creation/updates:
Notice: Undefined index: gp_media_gallery_asset in /var/www/html/magento/public_html/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 152
How can I change the code to have more detailed information.
This index does not exist but I want to know on which table this index is supposed to be.
Thanks for your support
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @eric_bangerter,
There is a foreign key in one table which leads to another unexisting table. To find where it is, you should access the file: siteurl/public/vendor/magento/framework/Setup/Declaration/Schema/Db.
Before the line 152, fix the code following this image.
Please let me know if you need further assistance. Hope it helps!
_____________
If issue solved, Click Kudos & Accept as Solution.
Shopping Cart Migration Service
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.5p1 setup:upgrade Undefined index: gp_media_gallery_asset
Do you have any custom module related to this? If yes then check db_schema.xml file for this module, something wrong in that.
https://www.manishmittal.com/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.5p1 setup:upgrade Undefined index: gp_media_gallery_asset
thank for your quick answer and support.
I have performed find . -name db_schema.xml -exec grep gp_customer_group {} \; to found the issue in all db_schema.xml file, but not found.
Any other idea ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.5p1 setup:upgrade Undefined index: gp_media_gallery_asset
Can you find out this in DB, find out that index key in database.
you can debug by open this file
vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php
and add some debug messages, to see where the problem is. The script stops on FK dependencies on flat tables.
So my solution is to delete them.
After this bin/magento setup:upgrade
will run without error!
https://www.manishmittal.com/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @eric_bangerter,
There is a foreign key in one table which leads to another unexisting table. To find where it is, you should access the file: siteurl/public/vendor/magento/framework/Setup/Declaration/Schema/Db.
Before the line 152, fix the code following this image.
Please let me know if you need further assistance. Hope it helps!
_____________
If issue solved, Click Kudos & Accept as Solution.
Shopping Cart Migration Service
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.5p1 setup:upgrade Undefined index: gp_media_gallery_asset
Hello,
thank you for the contribution, i think i'm facing the same problem when i try to upgrade from 2.2.7 to 2.3.0
Can you please put the fixed code on the comment the screen shott was removed
Thank you
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.5p1 setup:upgrade Undefined index: gp_media_gallery_asset
Thanks, i have setuo your way and successful.
Website: https://xsmb99.me/du-doan-xsmb.html
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Magento 2.3.5p1 setup:upgrade Undefined index: gp_media_gallery_asset
the image is now removed, answers should have a description of the image too because they can always be removed later