TurboPanel Docs
Getting Started

Database troubleshooting

TurboPanel uses versioned SQL migrations in turbopanel/migrations/ (applied via pnpm migrate; tracked in public.migration). Deno dev can still use drizzle-kit push (dev/scripts/sync.sh) for quick schema iteration without committing migration files. For how schema sync fits into the dev environment, see Development architecture and turbopanel/src/db/AGENTS.md in the repository.

Schema out of sync

IssueWhat to do
API errors about missing columns/tablesFrom dev/: ./scripts/sync.sh (or ./scripts/sync.sh --force after editing schema.ts)
You changed the DB in StudioRun dev/scripts/introspect.sh to pull live schema into turbopanel/src/db/schema.ts
Fresh Postgres volumeConverge applies versioned migrations (pnpm migrate via scripts/bootstrap-dev-db.sh) — the only fresh-database bootstrap path. Re-run Developer → Converge / re-converge if relations are missing

Connection failures

IssueWhat to do
Postgres unreachableCheck the turbopanel-database container (docker ps / Services area in ./console); verify Docker is running
Wrong credentialsPostgres credentials are generated during converge under /etc/turbopanel/; re-run Developer → Converge / re-converge
Connection pool wedged (Deno)systemctl restart turbopanel-instance (or restart it from the console Services area)

Reset dev database

Dev console: Developer → Reset dev database (asks for confirmation) — drops the public schema, re-applies the migrations, and restarts the instance into the install wizard.

Manual:

Terminal
# From dev/ with Postgres running
./scripts/sync.sh --force   # push schema.ts for quick iteration; to rebuild from migrations use Reset dev database

Nuclear (dev only): stop the instance (systemctl stop turbopanel-instance), remove the Postgres container and its data volume (docker rm -f turbopanel-database && docker volume rm turbopanel-database), then Developer → Converge / re-converge (recreates empty Postgres and applies migrations).

Drizzle Studio

  • Enable it from the Services list in ./console (Drizzle Studio is on by default in the optional-services picker).
  • Open https://local.drizzle.studio?host=localhost&port=4983.
  • Studio applies DDL directly — follow with dev/scripts/introspect.sh to pull changes into schema.ts.
  • Close Studio before running dev/scripts/sync.sh to avoid connection contention.

Do not run (current policy)

  • Raw drizzle-kit push outside dev/scripts/sync.sh / dev/scripts/introspect.sh workflows (use dev/scripts/sync.sh for Deno dev push)
  • Applying or committing migration SQL without reviewing generated files under migrations/

Manual debugging

Terminal
# From dev/
./scripts/sync.sh --verbose
docker exec -it turbopanel-database psql -U turbopanel -d turbopanel -c '\dt'
Edit on GitHub

Last updated on

On this page