Solved

How Do You Add a Foreign Key to an Existing

Question 84

Multiple Choice

How do you add a foreign key to an existing table created by another module?


A) Create etc/db_schema.xml file with the table node and constraint child node Create etc/db_schema.xml file with the table node and constraint child node
B) Run the command bin/magento setup:db-schema:upgrade <table> <constraint declaration> Run the command bin/magento setup:db-schema:upgrade <table> <constraint declaration>
C) This can only be done with raw SQL in a Schema Patch file
D) Create the etc/db_constraints.xml file and specify foreign key there in the constraint node Create the etc/db_constraints.xml file and specify foreign key there in the constraint node

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents