Files
EpicNext-Cms/drizzle.config.ts
openhands 9416317c5b
CI / check (push) Failing after 40s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
Format files according to Biome standards
2026-10-23 20:40:25 +02:00

23 lines
788 B
TypeScript

import { defineConfig } from "drizzle-kit";
// Schema source of truth for the query builder: src/db/schema.ts
// (regenerated via `pnpm db:schema:generate` from the previous schema + live DB).
//
// This DB is shared with the Arcturus emulator — NEVER run `drizzle-kit migrate`
// or `push` against it. CMS DDL stays in drizzle/migrations/*.sql applied by
// `pnpm db:migrate`. Use `pnpm db:generate` only for draft SQL under drizzle/drafts/.
const dbUrl = process.env.DATABASE_URL ?? "";
const isPostgres =
dbUrl.startsWith("postgres://") || dbUrl.startsWith("postgresql://");
export default defineConfig({
dialect: isPostgres ? "postgresql" : "mysql",
schema: "./src/db/schema.ts",
out: "./drizzle/drafts",
dbCredentials: {
url: dbUrl,
},
strict: true,
verbose: true,
});