0

Using the latest version of Magent2; 2.3.5 currently. When running the setup:upgrade query, we are hitting the below error:

Notice: Undefined index: store in /siteurl/public/vendor/magento/framework/Setup/Declaration/Schema/Db/SchemaBuilder.php on line 152

Looking at the store table, the admin ID has at somepoint changed from 0 to 2. Which is the likely issue. When restoring an old backup of this table, the id of 2 remains.

How is the above error rectified?

asked May 12, 2020 at 13:29

1 Answer 1

-3

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: https://prnt.sc/sjjvww

answered May 19, 2020 at 10:13
5
  • 2
    Well gee thanks for posting this as a screenshot which has been removed instead of a code fragment which could stay hosted for ever Commented Dec 13, 2021 at 23:45
  • the image on prnt.sc was deleted so how can I fix this? Commented Jan 24, 2022 at 17:56
  • -1 for screenshot was removed Commented Jun 27, 2022 at 4:51
  • add your fix in comment please, screenshot is removed! Commented Aug 8, 2023 at 8:00
  • code fragment > screenshot Commented Oct 8 at 13:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.