Skip to content

Open Tabletop 0.5.0

Choose a tag to compare

@optimuspryne optimuspryne released this 19 Aug 18:09
· 482 commits to main since this release

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_migrations table, so upgrading no longer needs a manual psql -f step — docker compose pull && up catches the database up on its own. Migrations run as a separate owner/DDL role via MIGRATE_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. Set AUTO_MIGRATE=false (or leave MIGRATE_DATABASE_URL unset) 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 role

Then pin the app image and pull:

image: optimuspryne/open-tabletop:0.5.0
docker compose pull && docker compose up -d

On 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