_sqlx_migrations


Description

{“what”:“Tracks applied database migrations for sqlx tooling.”,“why”:“Without it, sqlx cannot know which migrations ran, risking re-runs or missing schema changes.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.483622393+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
version int8 19 null

{“what”:“Migration version number, unique identifier for each migration.”,“why”:“Ensures each migration is applied exactly once; lookup key for applied set.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.642705391+00:00”}

description text 2147483647 null

{“what”:“Human-readable description of the migration, e.g., ‘create users table’.”,“why”:“Provides context for operators debugging which change a version corresponds to.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.673908691+00:00”}

installed_on timestamptz 35,6 now()

{“what”:“Timestamp when the migration was successfully applied.”,“why”:“Shows when schema changes happened; useful for auditing and rollback decisions.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.689504490+00:00”}

success bool 1 null

{“what”:“Whether the migration completed successfully (true) or failed (false).”,“why”:“Distinguishes applied from failed attempts; sqlx uses it to decide if a version is safe to re-run.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.710649514+00:00”}

checksum bytea 2147483647 null

{“what”:“Binary checksum of the migration file content.”,“why”:“Detects if a migration file was modified after being applied, preventing silent drift.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.739725408+00:00”}

execution_time int8 19 null

{“what”:“Duration of migration execution in milliseconds.”,“why”:“Helps identify slow migrations that may need optimization or cause downtime.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:04:33.779678421+00:00”}

Indexes

Constraint Name Type Sort Column(s)
_sqlx_migrations_pkey Primary key Asc version

Relationships