Use case · Data and backups

Make database drops and destructive restores a deliberate decision

Add a review checkpoint in front of the database commands that discard state, so a migration window cannot turn into an outage.

Most migration work is additive, but the commands that go wrong are the ones that drop or reset: dropdb, mysqladmin drop, supabase db reset, mongorestore --drop, and SQLite restores that replace content. The catalog documents each of these as critical-severity review operations.

Evidence grade: reviewed catalog facts · Last reviewed 2026-09-12

Every step below references coverage documented in the HOL Guard extension catalog. These workflows are derived from reviewed catalog facts, not independently run or benchmarked — verify the result in your own setup before relying on it.

When this is not the right fit

Skip this workflow if

  • The migration only adds tables and columns — these entries document destructive drop, reset, and restore operations, not schema additions.
  • Your migration tool has no documented CLI operations in the catalog; the catalog does not claim coverage for it.

Prerequisites

Before you start

  • Guard is installed on the machine where migration commands run.
  • You know which database CLIs your migration scripts invoke.

Steps

The workflow

  1. 1

    Review PostgreSQL database removal

    The PostgreSQL entry reviews dropdb invocations that remove a PostgreSQL database.

    PostgreSQL command protectionTry this coverage Coverage details
  2. 2

    Review MySQL database removal

    The MySQL entry reviews mysqladmin drop operations that remove a database and its tables.

    MySQL command protectionTry this coverage Coverage details
  3. 3

    Review Supabase resets and migration rollbacks

    The Supabase entry reviews supabase db reset and supabase migration down — including their npx, pnpm, and npm exec wrapper forms — as operations that discard database state.

    Supabase command protectionTry this coverage Coverage details
  4. 4

    Review destructive MongoDB restores

    The MongoDB entry reviews mongorestore --drop operations that replace target collections. The catalog lists --dryrun as a safe variant.

    MongoDB command protectionTry this coverage Coverage details
  5. 5

    Review SQLite content replacement

    The SQLite entry reviews sqlite3 .restore operations that replace database content from a backup.

    SQLite command protectionTry this coverage Coverage details

Expected result

What the documented coverage should do

Drop, reset, and destructive-restore commands that match the reviewed operations pause for a review decision before they touch the database. Additive migration steps and documented safe variants such as --dryrun for mongorestore stay outside this coverage.

Limitations

What this workflow does not claim

  • These entries document CLI operations; migration frameworks without documented operations are not covered.
  • Redis key and flush operations are covered by a separate database entry (command.database.redis) and are not part of this workflow.
  • Coverage is limited to the reviewed operations and the surrounding Guard policy, per the catalog’s stated limitations.

Coverage referenced

Extensions in this workflow