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-format CI job.
  • PostgreSQL version matrix: db:migrate and test:integration CI 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 via pg_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.md updated with new jobs and formatting section. Script error message convention added to conventions.md.

Merge order

  1. This MR (tooling)
  2. !237 (merged) (foundation schema migrations, rebased onto this)
  3. db-review-prep skill (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)

Merge request reports

Loading
Loading