Skip to content

history

Show the audit trail for an environment. Alias: audit.

Database required: Yes

Usage

bash
dbsh history
dbsh history --environment production --limit 50
dbsh history --json

Options

OptionShortDescription
--limit-lMaximum entries to display (default: 25)

Also accepts global options.

What it shows

The audit trail records every action performed against the database:

  • Validate — script validation runs
  • DryRun — plan computations
  • Deploy — migration applications
  • Rollback — rollback operations
  • Repair — failed migration repairs

Example output

 Audit Trail

  Environment:    production
  Showing:         10 of 45 entries

  #  Action    Performed By     At                      Details
    ────────  ────────  ────────  ────────  ────────
  1  Deploy    jane@corp.com    2026-06-17 14:30:00     Applied 3 migrations (002-004)
  2  Deploy    deploy-bot       2026-06-15 10:00:00     Applied 1 migration (001)
  3  Rollback  jane@corp.com    2026-06-16 16:45:00     Rolled back 004

JSON output

bash
dbsh history --json

Returns an array of audit entries with action, performedBy, performedAtUtc, environment, and details fields.

Released under the MIT License.