Skip to content

MOS-16: Run the server on PostgreSQL, add --migrate flags - #21

Merged
timoruohomaki merged 1 commit into
masterfrom
feat/MOS-16-server-postgres
Nov 9, 2026
Merged

timoruohomaki merged 1 commit into
masterfrom
feat/MOS-16-server-postgres

Conversation

@timoruohomaki

Copy link
Copy Markdown
Contributor
  • main wires postgres.New(pool) in place of the in-memory store, which is now used only in tests. PostgreSQL is required: without DATABASE_URL, postgres.url or PG* variables the server exits.
  • --migrate applies pending migrations before starting; --migrate-only applies them and exits. Migrations use MIGRATE_DATABASE_URL (postgres.migrateurl) when set, with the same verify-full rule.
  • A plain start checks the schema version and refuses an outdated one; a newer schema only logs a warning.
  • postgres.MigrateWith and postgres.CheckSchema with tests against the test database (fresh, migrated, rolled back, newer, TLS rule, wrong password with SQLSTATE 28P01).
  • Docs: README quick start and requirements, developer reference flags, roadmap and migration plan.

- main wires postgres.New(pool) in place of the in-memory store, which is
  now used only in tests. PostgreSQL is required: without DATABASE_URL,
  postgres.url or PG* variables the server exits.
- --migrate applies pending migrations before starting; --migrate-only
  applies them and exits. Migrations use MIGRATE_DATABASE_URL
  (postgres.migrateurl) when set, with the same verify-full rule.
- A plain start checks the schema version and refuses an outdated one;
  a newer schema only logs a warning.
- postgres.MigrateWith and postgres.CheckSchema with tests against the
  test database (fresh, migrated, rolled back, newer, TLS rule, wrong
  password with SQLSTATE 28P01).
- Docs: README quick start and requirements, developer reference flags,
  roadmap and migration plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@timoruohomaki
timoruohomaki merged commit 944e6d7 into master Nov 9, 2026
3 checks passed
@timoruohomaki
timoruohomaki deleted the feat/MOS-16-server-postgres branch November 9, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant