-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrizzle.config.ts
More file actions
20 lines (18 loc) · 850 Bytes
/
Copy pathdrizzle.config.ts
File metadata and controls
20 lines (18 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { defineConfig } from "drizzle-kit";
if (!process.env.DATABASE_URL) {
throw new Error("DATABASE_URL, ensure the database is provisioned");
}
export default defineConfig({
out: "./migrations",
schema: ["./shared/schema.ts", "./shared/integrations-schema.ts", "./shared/billing-schema.ts", "./shared/copy-trading-schema.ts", "./shared/journal-schema.ts"],
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL,
},
// Do NOT let `push` touch the postgres-migrations tracking table used by the
// @acpr/rate-limit-postgresql store (public.migrations). It is not part of the
// Drizzle schema, so `push --force` would drop it on every boot, desyncing it from
// the persistent rate_limit.* objects and forcing a failing re-init. See
// scripts/migrate-ratelimit.cjs.
tablesFilter: ["!migrations"],
});