QuestionQ4

EAV/Database

In a new module release, a developer chooses to rename a table that was defined in previous versions.

Which action, if any, enables the developer to avoid data loss?

  • A Define onCreate=“migrateDataFromAnotherTable(old_table_name)” attribute in the table tag.
  • B Declarative schema supports ‘RENAME TABLE’, so the data will be migrated to the new table automatically.
  • C Define the table and columns mapping in the db_schema_whitelist.json.
Explanation

Adobe Commerce declarative schema does not support renaming through RENAME TABLE. To preserve the existing rows, the newly declared table must use onCreate="migrateDataFromAnotherTable(old_table_name)", which migrates data when that table is created. db_schema_whitelist.json does not itself define a table-and-column data mapping.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!