Loading
chore(database): add database tooling infrastructure
Summary
Foundation tooling for the database development workflow, landing ahead of the first migrations (!237 (merged)) so the full validation pipeline is in place when they arrive.
What's included
- pgFormatter: SQL formatting via mise http backend, pre-commit hook, and
lint:sql-formatCI job. - PostgreSQL version matrix:
db:migrateandtest:integrationCI jobs run against PG 16, 17, and 18 (all currently supported versions plus the next one). Versions defined in.gitlab-ci-other-versions.yml; Renovate manages the next version. - Pre-commit hooks:
pgformat(before squawk),pg-version-sync(catches drift between matrix and version variables). - CI jobs:
db:migrate(PG matrix),db:structure-check,lint:sql-format,lint:migration-ordering. dump-structure.sh: deterministic schema snapshot viapg_dump+sed+pg_format. Works locally (ephemeral container) and in CI.- Squawk fix: corrected binary name (
squawk-cli->squawk), synced version to 2.51.0. - Docs:
database-migrations.mdupdated with new jobs and formatting section. Script error message convention added toconventions.md.
Merge order
- This MR (tooling)
- !237 (merged) (foundation schema migrations, rebased onto this)
db-review-prepskill (separate MR)
Test plan
- Pre-commit hooks pass (pgformat, squawk, pg-version-sync)
- CI green (jobs trigger on migration changes, so lint/validate jobs will be skipped here)