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.
Command icon 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

rajeshreeputra created an issue. See original summary.

rajeshreeputra’s picture

Issue summary: View changes
rajeshreeputra’s picture

Issue summary: View changes

rajeshreeputra’s picture

Title: Remove Media: Acquia DAM tables post migration » Post-migration cleanup for Media: Acquia DAM legacy fields and tables.
Version: 2.1.2 » 2.x-dev
Issue summary: View changes
Status: Active » Needs review

rajeshreeputra’s picture

Status: Needs review » Fixed

Merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

danflanagan8’s picture

Doesn't this make the whole migration impossible to deploy?

I had planned to do this:

  • Locally, I get everything working and then I can commit the end-state configuration and composer stuff to the repo.
  • Prior to deploying, I disable acquiadam_asset_import in the higher environment. (drush pmu acquiadam_asset_import)
  • Then I deploy to the higher environment.
  • Then I run `drush acquiadam:migrate` in the higher environment

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.

rajeshreeputra’s picture

Status: Closed (fixed) » Needs review
rajeshreeputra’s picture

Issue summary: View changes

Updated proposed resolution to not decommission field immediately during migration.

rajeshreeputra’s picture

Issue summary: View changes
rajeshreeputra’s picture

Issue summary: View changes

rajeshreeputra’s picture

Status: Needs review » Fixed

Merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.