In a new release of a module, a developer decides to rename a table that was defined in the earlier versions. Which action, if any, allows the developer to prevent 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
When renaming a table in Magento, to prevent data loss, the developer must define the table and its columns mapping in thedb_schema_whitelist.jsonfile. This declarative schema approach ensures that the data migration tool knows about the changes and can migrate data from the old table to the newly named table without losing any data.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit