How do you do that?

You want to remove a column introduced by a third-party extension via declarative schema.
How do you do that?
A. Create the etc/db_schema.xml file and specify disable="true" on the column
B. Modify the original etc/db_schema.xml file and remove the column from there
C. Create a SchemaPatch file and remove the column programmatically
D. Copy the etc/db_schema.xml file into your module and remove the column from your copy

Download Printable PDF. VALID exam to help you PASS.

11 thoughts on “How do you do that?

  1. Answer: B

    In that case, Here is not say upgrading in mind so we can change third party module file because

    Regarding A: Magento allowed removing column using “disabled” not “disable”
    Regarding D: IF you overite any XML file and you remove specific code in XML, the system will find first in overwriting file if not able to find then search it in the parent XML file. and here again added remove code in this file

    2
    1
  2. D is the answer

    – you need to copy db_schema.xml file in you module
    – remove the column from your copy means add “disabled=true” in your copied xml file

  3. – you need to copy db_schema.xml file in you module
    – remove the column from your copy means add “disabled=true” in your copied xml file

  4. i had try it by myself , and found D didnot affect.

    A also didnot affect because of “disable”, the correct attribute is “disabled”.

    At last, i choose A.

  5. Its D because you wouldn’t want to edit a 3rd parties actually code. D Is the same solution as A bit it specifies its in your own module which is a “better” correct answer

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.