Change record status: 
Project: 
Introduced in branch: 
1.1.x
Introduced in version: 
1.1.10
Description: 

What's New

A new Drush command acquia-dam:resolve-asset-media-type (alias: adramt) has been added to update media entities to use the correct media type based on their actual asset file type from Acquia DAM.

New Drush command:

drush acquia-dam:resolve-asset-media-type

What This Solves

  1. Migration from media_acquiadam module:
    The legacy media_acquiadam module allowed a single media type to reference multiple file types (e.g., both PDF and DOCX files). The new acquia_dam module has separate, specialized media types for each file type (PDF media type, Document media type, etc.).
    After migration, this command automatically corrects media type mismatches by fetching asset metadata from DAM and updating media entities to their correct types.
  2. New media type introduction:
    When new, more specific asset types are added to a site, this command migrates existing generic assets into the appropriate specialized media types.

How to Use

  • Basic usage:
      drush acquia-dam:resolve-asset-media-type
      
  • Process in smaller batches:
      drush acquia-dam:resolve-asset-media-type --batch-size=100
      
  • Target specific media type:
      drush acquia-dam:resolve-asset-media-type --media-type=acquia_dam_image_asset
      

How It Works

The command queries all media entities with acquia_dam_asset_id, fetches asset metadata from DAM, determines the correct media type, and updates mismatched entities. For "Download and sync" workflow, it automatically migrates local file data between media__acquia_dam_managed_image and media__acquia_dam_managed_file tables.

Impacts: 
Site builders, administrators, editors
Module developers