Development helper functions to delete artworks and artists from the database and optionally from CDN storage. Database deletion uses CASCADE constraints to automatically remove all related records.
Usage
delete_artwork(artwork, artist = NULL, delete_cdn = FALSE, cn = NULL)
delete_artist(artist, delete_cdn = FALSE, cn = NULL)Value
Invisible TRUE on success, FALSE if artwork not found
Invisible TRUE on success, FALSE if artist not found
Details
These functions leverage PostgreSQL CASCADE delete constraints:
Deleting from
artwork_indexcascades to 13 child tablesDeleting from
artist_indexcascades to 18 tables (including all artworks)
CDN deletion uses artcore::cdn_hard_delete() which is robust to missing assets.
