A developer wants to rename a column in a custom module, so both columns were added to db Which additional action, if any. is needed to migrate data between the two columns?
A.
No additional action will be needed since the data is migrated automatically.
B.
Add onCreate="migrateDataFrom(old_column_name)" in the column definition in db_schema.xml.
C.
Add 'old’ attribute with the previous name of the column in the db_schema.xml.
To migrate data between two columns when renaming a column in a custom module, add onCreate="migrateDataFrom(old_column_name)" in the column definition in the db_schema.xml file. This will ensure that the data is migrated from the old column to the new column. Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/declarative-schema/db-schema.html#on-create