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?
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.
RENAME TABLE
onCreate="migrateDataFromAnotherTable(old_table_name)"
db_schema_whitelist.json
Community Discussion