Repository navigation
Open Tabletop 0.5.0
Open Tabletop 0.5.0
Database upgrades are now hands-off — the app migrates its own schema on startup.
✨ Added
- Automatic schema migrations. The app applies any pending database migrations itself when it boots, tracked in a
schema_migrationstable, so upgrading no longer needs a manualpsql -fstep —docker compose pull && upcatches the database up on its own. Migrations run as a separate owner/DDL role viaMIGRATE_DATABASE_URL, so the running server keeps its least-privilege connection, and the mechanism works against any Postgres: the bundled db image, stock Postgres, or a managed instance. SetAUTO_MIGRATE=false(or leaveMIGRATE_DATABASE_URLunset) to keep managing migrations by hand.
⬆️ Upgrading
Set MIGRATE_DATABASE_URL to an owner/DDL connection string — the bundled docker-compose.yml now does this for you:
# app service
environment:
DATABASE_URL: postgresql://tabletop_app:${APP_DB_PASSWORD}@db:5432/tabletop
MIGRATE_DATABASE_URL: postgresql://tabletop:${DB_PASSWORD}@db:5432/tabletop # owner roleThen pin the app image and pull:
image: optimuspryne/open-tabletop:0.5.0docker compose pull && docker compose up -dOn its first boot the app records your existing schema as the migration baseline — nothing is replayed onto tables you already have — and applies anything new from then on. No manual SQL, and no database-image rebuild (open-tabletop-db:0.3.0 is still current — the app migrates on top of whatever the db image ships). Upgrade sequentially if you're coming from a release older than 0.4.0.
Prefer to manage migrations yourself? Set AUTO_MIGRATE=false, or leave MIGRATE_DATABASE_URL unset, and apply postgres/*.sql by hand as before.
Full changelog: https://github.com/optimuspryne/open-tabletop/blob/main/CHANGELOG.md
Compare: v0.4.0...v0.5.0