What problem does it solve?
Onboard-db-commune helps you safely connect an AMSA application to the shared PostgreSQL database db_commune, including diagnosis, required code conversion, Alembic bootstrap, and cleanup of isolated database configuration.
Core Features & Use Cases
- Smart diagnosis first: classifies the app’s current database setup (SQLite vs PostgreSQL async/sync, Alembic presence) and determines which phases to run.
- Dual-mode conversion: for SQLite or PostgreSQL sync setups, updates the app to use async PostgreSQL while keeping dev-friendly SQLite behavior when required.
- Production-grade schema safety: enforces fail-secure schema scoping via
MetaData(schema=...) so tables land in the correct {app_name} schema rather than drifting into public.
- db_commune infrastructure wiring: provisions roles, schemas, grants, PgBouncer aliases, secrets/health checks, and validates CI/CD expectations for password provisioning.
- Final verification & reporting: produces a phase-by-phase validation report and highlights CI/CD risks and blocked fixes.
Quick Start
Run the onboarding by calling: /onboard-db-commune planning_projets /path/to/app planning_projets_db_commune_dir