Open
Description
Lately, we encountered a few issues with attachments through ActiveStorage. Thus, we should validate our integration:
- Ensure files get removed completely through ActiveStorage. This includes:
- Deleting the attachment (keeping the record otherwise) removes the database entry (in internal ActiveStorage tables) and the file on disk.
- Completely removing the record also removes database entries and files.
- All relevant files (i.e., resized images) are considered.
- Provide a simple script to check that all files in
/storage
are referenced in the database and vice versa. Further, each object referenced in the internal ActiveStorage tables should still exist and not be soft-deleted (users!). This script is intended to run on production once.