Getting Started

Database troubleshooting

TurboPanel uses versioned SQL migrations in instance/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 Tilt, see Development architecture and instance/src/lib/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 instance/src/lib/db/schema.ts
Fresh Postgres volumeDeno auto-pushes on startup when user table is missing; or run dev/scripts/sync.sh --force manually

Connection failures

IssueWhat to do
Postgres unreachableCheck Tilt postgres resource; verify Docker is running
Wrong credentialsCheck dev/.env POSTGRES_* vars; re-run env sync (tilt trigger env-sync or restart Tilt)
Connection pool wedged (Deno)Restart the instance resource

Reset dev database

Developer console (superadmin): /developer/databaseReset Dev Instance — drops public, re-pushes schema.ts, restarts instance. UI redirects through /recovering then /install or /sign-in.

Manual:

# From dev/ with Postgres running
./scripts/sync.sh --force   # after DROP SCHEMA public CASCADE; or use reset-dev API

Nuclear (dev only): stop Tilt, remove dev/.postgresql/ data directory, tilt up (recreates empty Postgres).

Drizzle Studio

Do not run (current policy)

Manual debugging

# From dev/
./scripts/sync.sh --verbose
docker exec -it $(docker ps -qf name=postgres) psql -U turbopanel -d turbopanel -c '\dt'
Edit on GitHub

Last updated on

On this page