Skip to content

Code Migrations

github-actions[bot] edited this page Oct 14, 2026 · 1 revision

Migrations

goose, SQL, forward-only, one concern per file, sequential zero-padded names.

The full inventory — all 22 files, what each creates, and which phase adds it — is in ../docs/plan/20-data-model.md §13. The reasoning behind every constraint and index is in the same document, along with a register of 19 deliberate deviations from the spec sketch.

Read that register before changing a table.

make migrate        # up
make migrate-down   # down one
make migrate-redo   # up -> reset -> up, which is what CI runs

Every file needs a working -- +goose Down. CREATE INDEX CONCURRENTLY cannot run inside a transaction, so any file using it needs -- +goose NO TRANSACTION. None of 00001–00022 does: they create empty tables, where a plain CREATE INDEX is instant.


Generated from migrations/README.md. Edit that file in the repository; changes made on this page are overwritten.

Home

Start here

Product

Implementation plan

Redesign (Phase R)

Setup and operations

Design

Team

Code READMEs

Clone this wiki locally