Overhaul digitalobject:delete task and add new options to delete all digital objects associated with a repository, and limit to a specific media type
|Category:||CLI tools||Estimated time:||14.00 hours|
|Target version:||Release 2.6.0|
|Google Code Legacy ID:||Tested version:|
AtoM has a command-line task that can be used to delete a digital object from the command-line, documented here:
This task accepts an information object slug as a parameter, and will remove an attached digital object (and its derivatives) when run. There is also currently an
--and-descendants option that will also delete any DOs attached to descendant descriptions in an archival unit.
This feature enhancement will overhaul the task's implementation (which should see some performance improvements), and add two new options.
First, instead of providing a description slug, users can now provide the slug of an archival institution (AKA repository) record to delete all digital objects linked to descriptions associated with a particular archival institution. When this option is used, the existing
--and-descendants option will be ignored - by default, providing a repository slug means that ALL associated digital objects at all levels will be deleted from the related descriptions.
Second, a new
--media-type option will be included, that will allow users to limit the task's deletion to a specific type of digital object. Valid option parameters are:
Example use: deleting all video files linked to descriptions associated with the Example repository:
php symfony digitalobject:delete --media-type="video" example-repository
#2 Updated by Steve Breker about 2 years ago
- slug argument can now be either a repo or description
- added new '--dry-run' option - this will allow the CLI task to be run without updating the DB to test what will be modified
- added new '--media-type' option to restrict deletion to certain types.
- uses PDO DB queries instead of Propel ORM to get children. Also avoid loading all children as objects at once.
- add code to clear in memory objects when they are no longer needed.
- error when running this task in 2.6.x where not enough params are supplied to function: derivativesGeneratedFromExternalMaster()
- error when deleting DOs from a hierarchy where two images are exactly the same.
#6 Updated by Dan Gillean almost 2 years ago
- Requires documentation deleted (