Skip to main content

Migration Metadata

Queen stores each currently applied migration's version, name, checksum, and application time. Built-in drivers also support:

FieldMeaning
applied_byCurrent OS user when available.
duration_msMigration execution time in milliseconds.
hostnameHost where the migrator ran, when available.
environmentValue of QUEEN_ENV.
actionOperation such as apply or mark-applied.
statusCurrent result, normally success; PostgreSQL non-transactional migrations can temporarily be applying or rolling_back.
error_messageOptional error details when recorded by the driver flow.

The history table represents current applied state, not an append-only log of every attempt. Rollback removes a successful migration record. Use Queen.Status(ctx) for the current state in code, or Queen.Driver().GetApplied(ctx) when you need persisted records with metadata.

The PostgreSQL recovery markers are described under non-transactional migrations.