PostgreSQL runtime migration and backup/restore policy #207

Closed
opened 2026-07-07 14:03:59 +02:00 by zemion · 1 comment
Owner

Goal

Move the supported production database posture from SQLite-first development defaults toward PostgreSQL as the recommended deployment database.

Acceptance Criteria

  • Document PostgreSQL as the production target while preserving SQLite for local development.
  • Provide a tested example DATABASE_URL and migration bootstrap path.
  • Provide installer daemon backup, restore-check, and restore commands using pg_dump / pg_restore.
  • Add a disposable PostgreSQL integration check for migrations and module permutations.
  • Confirm module install/uninstall rollback behavior against PostgreSQL backup artifacts.

Context

Codex added --database-restore-check-command so non-SQLite installer runs can validate a produced backup before migrations proceed. The next step is to make PostgreSQL the explicit production path and test it end-to-end.

## Goal Move the supported production database posture from SQLite-first development defaults toward PostgreSQL as the recommended deployment database. ## Acceptance Criteria - Document PostgreSQL as the production target while preserving SQLite for local development. - Provide a tested example `DATABASE_URL` and migration bootstrap path. - Provide installer daemon backup, restore-check, and restore commands using `pg_dump` / `pg_restore`. - Add a disposable PostgreSQL integration check for migrations and module permutations. - Confirm module install/uninstall rollback behavior against PostgreSQL backup artifacts. ## Context Codex added `--database-restore-check-command` so non-SQLite installer runs can validate a produced backup before migrations proceed. The next step is to make PostgreSQL the explicit production path and test it end-to-end.
Author
Owner

Codex State: done

PostgreSQL is now the documented default development/runtime path while SQLite remains available through GOVOPLAN_DEV_DATABASE_BACKEND=sqlite.

Implemented and verified:

  • default dev runtime now points at postgresql+psycopg://govoplan_dev@127.0.0.1:5432/govoplan_dev
  • launch-dev.sh and govoplan_core.devserver support PostgreSQL defaults plus SQLite fallback
  • README/dev/operator docs document PostgreSQL setup, pg-tools URLs, bootstrap, and fallback behavior
  • pg_dump --schema-only was verified through the host PostgreSQL tools path
  • module installer rollback drill passed, including the PostgreSQL backup/restore-check hook scenario
  • module migration smoke passed through tests/test_module_system.py

Follow-on scaling and production profile work remains tracked separately in #18, #217, and #219.

## Codex State: done PostgreSQL is now the documented default development/runtime path while SQLite remains available through `GOVOPLAN_DEV_DATABASE_BACKEND=sqlite`. Implemented and verified: - default dev runtime now points at `postgresql+psycopg://govoplan_dev@127.0.0.1:5432/govoplan_dev` - `launch-dev.sh` and `govoplan_core.devserver` support PostgreSQL defaults plus SQLite fallback - README/dev/operator docs document PostgreSQL setup, pg-tools URLs, bootstrap, and fallback behavior - `pg_dump --schema-only` was verified through the host PostgreSQL tools path - module installer rollback drill passed, including the PostgreSQL backup/restore-check hook scenario - module migration smoke passed through `tests/test_module_system.py` Follow-on scaling and production profile work remains tracked separately in #18, #217, and #219.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-core#207
No description provided.