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:
Verified
Q79: You are tasked to install an extension
Q80: You are reviewing a Magento module and
Q81: A module declares the route:
Q82: You are developing a new theme which
Q83: The constructor function for \Magento\Catalog\Model\Category contains this
Q85: What are two functions of a resource
Q86: You want to remove a column introduced
Q87: A module MyModule needs to send notifications
Q88: While reviewing a layout file named sales_order_view.xml
Q89: The module MyCompany_MyModule provides custom admin interface
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents