Files
formulation/docs/help/archive/lifecycle-and-restoration.md
T

1.3 KiB

Archive & Lifecycle Management

Formulation implements a two-stage deletion lifecycle (Soft Delete \rightarrow Hard Delete) with automated dependency safeguards to protect culinary data integrity.


1. Soft Deletion (Archiving)

  • When an ingredient, recipe, or recipe book is deleted, it is soft-deleted (deleted_at timestamp recorded) rather than purged immediately.
  • Archived items are immediately hidden from active searches, auto-complete dropdowns, and directory views.
  • Active recipes that historically reference an archived ingredient remain intact without breaking calculations.

2. Archive Workspace (/app/archive/)

The Archive workspace allows viewing and managing all removed items:

  • Filter by Entity: Filter by All, Recipes, Ingredients, or Recipe Books.
  • Multi-Item Batch Selection: Select multiple items using checkboxes to perform bulk actions.
  • Batch Restore: Instantly restore selected items back to the active catalog.
  • Safe Permanent Deletion:
    • Permanently purges items from the database.
    • Dependency Safeguard: Formulation automatically verifies whether an item is still referenced by any active recipe or sub-recipe. If dependencies exist, hard deletion is blocked with a clear warning explaining where the item is currently used.