Problem/Motivation
After migrating from legacy Media: Acquia DAM tables to new Acquia DAM module tables, several cleanup operations are required to remove obsolete data and optimize the database:
Current migration leaves:
- Legacy tables with migrated data
- Local asset entries
- Legacy media type fields
Proposed resolution
- Data Deletion: Remove all entries from the legacy tables once they have been successfully transitioned to the new table.
- Handle local assets based on migration option:
- Sync option: Move local assets → new local asset table
- Embed option: Delete local asset entries/files (unnecessary for embed)
Field Decommissioning: Delete legacy fields from the media type immediately following the migration to the new source plugin.Create Drush command to identify and drop any legacy tables missed/left empty during migration.- Updated: Create Drush command(acquiadam:post-migrate) to identify and decommission legacy field post migration.
Issue fork media_acquiadam-3563724
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rajeshreeputraComment #3
rajeshreeputraComment #5
rajeshreeputraComment #7
rajeshreeputraMerged!
Comment #10
danflanagan8Doesn't this make the whole migration impossible to deploy?
I had planned to do this:
But I can't do that anymore because the config sync that happens during deployment will delete the legacy asset id and file fields before the data in those fields has a chance to be migrated.
Comment #12
rajeshreeputraComment #13
rajeshreeputraUpdated proposed resolution to not decommission field immediately during migration.
Comment #14
rajeshreeputraComment #15
rajeshreeputraComment #17
rajeshreeputraMerged!