-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Closed
Copy link
Labels
Component: Framework/SetupUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug occurs during Catalog Setup use just CatalogUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug occurs during Catalog Setup use just CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedProgress: doneReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releaseTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject itbug reportfeature request
Description
Preconditions (*)
- Magento 2.3.0
Steps to reproduce (*)
- Create a module that uses Declarative Schema by creating a
db_schema.xml
- Try to create a
foreignKey
with asreferenceTable
a table that isn't created/controlled through Declarative Schema (in my case a 3rd party extension's table) - Run
php bin/magento setup:upgrade
Expected result (*)
- Table is created with a foreign key to referenced table
Actual result (*)
- Error
Notice: Undefined index: referenced_table_name_here in vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php on line 352
When I edit vendor/magento/framework/Setup/Declaration/Schema/SchemaConfig.php:77
and add print_r(array_keys($data['table']));exit;
there, I get a list of all tables created by extensions that use Declarative Schema. The referenced table isn't one of them and thus setup:upgrade
throws an error.
AnshuMishra17, aapokiiso, brian-labelle, joshuaadickerson, mcspronko and 9 more
Metadata
Metadata
Assignees
Labels
Component: Framework/SetupUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug occurs during Catalog Setup use just CatalogUSE ONLY for FRAMEWORK RELATED BUG! E.g If bug occurs during Catalog Setup use just CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedProgress: doneReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 releaseTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itIssue related to Developer Experience and needs help with Triage to Confirm or Reject itbug reportfeature request
Type
Projects
Status
Done