Files
GearBox/drizzle.config.ts
Jean-Luc Makiola 3724cf8348 feat(14-01): rewrite database foundation from SQLite to PostgreSQL
- Replace all 13 sqliteTable definitions with pgTable (pg-core)
- Convert integer timestamps to native timestamp type with defaultNow()
- Convert real columns to doublePrecision, integer used to boolean
- Rewrite db connection to use postgres.js driver with DATABASE_URL
- Rewrite migrate.ts to use postgres-js migrator targeting drizzle-pg/
- Convert seed.ts to async
- Update drizzle.config.ts to postgresql dialect
- Install postgres and @electric-sql/pglite, remove better-sqlite3
2026-04-04 12:17:05 +02:00

13 lines
274 B
TypeScript

import { defineConfig } from "drizzle-kit";
export default defineConfig({
out: "./drizzle-pg",
schema: "./src/db/schema.ts",
dialect: "postgresql",
dbCredentials: {
url:
process.env.DATABASE_URL ||
"postgresql://gearbox:gearbox@localhost:5432/gearbox",
},
});