Journal tables
What bsm stores in each database (schema bsm, configurable).
| Table | Contents |
|---|---|
bsm.changes | One row per applied change: sequence, name, script hash, chain id, deploy/revert/verify scripts, flags, deployed at/by/host, tool version, duration, out-of-order and baseline flags, rendered hashes |
bsm.repeatables | Current and previous script and hash of each repeatable, applied at/by |
bsm.events | Append-only log: deploy, revert, fail (with the error), repeatable, baseline, resource, repair; actor, host, tool version, environment |
bsm.schema_snapshots | Schema fingerprint and canonical dump after each run, with the head chain id |
bsm.meta | state_version (journal layout) and environment (owner) |
-- what is deployed, in order
SELECT sequence, name, deployed_at, deployed_by, applied_out_of_order FROM bsm.changes ORDER BY sequence;
-- recent failures
SELECT TOP (20) at, name, message, actor, host FROM bsm.events WHERE kind = 'fail' ORDER BY id DESC;
Badger SQL Migrate creates the schema and tables on the first deploy and upgrades them itself; a newer journal than the tool understands stops the tool with a message to upgrade. Change the schema name with stateSchema. Do not edit these tables by hand: they are the certificate.