Run the script with two arguments, the canonical asset ID and the merge asset ID. All logs referencing the merge asset ID will be updated to reference the canonical asset ID and the merge asset will be deleted.
Set the $debug
flag to TRUE
to run the script without performing any operations.
To separate the script arguments from the drush scr
arguments using --
. eg: drush scr asset_merge.php -- 1 15
Dry run:
$ drush scr asset_merge.php -- 1 15
Found canonical asset 1: 'corn 5/05/20'
Found merge asset 15: 'corn 5/05/20'
1 logs need update:
Log 16: 'Move corn 5/05/20 to Field 2'
Executing
$ drush scr asset_merge.php -- 1 15
Found canonical asset 1: 'corn 5/05/20'
Found merge asset 15: 'corn 5/05/20'
1 logs need update:
OP: Updated log 16: 'Move corn 5/05/20 to Field 2'
OP: Deleted asset 15: 'corn 5/05/20'