Documentation
¶
Overview ¶
Package sqlmigrate applies embedded goose migrations to a SQLite database. Every store (internal/store, internal/host/store) funnels through here so the repo has exactly one migration mechanism.
Migrations are goose-format .sql files generated from each store's declarative schema.sql via `make migration` (Atlas computes the diff); this package only ever applies them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpSchema ¶
DumpSchema returns a normalized, deterministic description of db's user-visible schema: one line per table column and per index. Built for the per-store schema-identity tests (goose-migrated database ≡ schema.sql), which is what keeps sqlc's input honest against what actually runs.
Tables are described structurally (pragma_table_info) because SQLite rewrites a table's stored CREATE text on every ALTER, making text comparison meaningless once real migrations exist. Index DDL is never rewritten, so indexes compare by normalized statement text — which also covers partial-index WHERE clauses that pragmas can't see. CHECK constraints are invisible to both views; the Atlas sync check in CI (`make migrations-check`) covers those semantically.
Types ¶
This section is empty.