Skip to content

Database Migrations

OpenCodeHub uses Drizzle for schema management.

Terminal window
npm run db:generate

Generates SQL migrations from the current schema.

Terminal window
npm run db:migrate

Applies pending migrations to the configured database.

Terminal window
npm run db:push

Pushes schema changes directly (useful for local development).

Terminal window
npm run db:studio

Opens the Drizzle Studio UI for inspecting tables.