-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrizzle.config.ts
More file actions
35 lines (31 loc) · 896 Bytes
/
drizzle.config.ts
File metadata and controls
35 lines (31 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 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",
// dialect: "postgresql",
// dbCredentials: {
// url: process.env.DATABASE_URL,
// },
// verbose:true,
// strict:true
// });
import { defineConfig } from "drizzle-kit";
if (!process.env.DATABASE_URL) {
throw new Error("DATABASE_URL is not defined, ensure the database is provisioned");
}
export default defineConfig({
out: "./migrations",
schema: "./shared/schema.ts",
dialect: "postgresql",
dbCredentials: {
url: process.env.DATABASE_URL,
ssl: {
rejectUnauthorized: false, // If you want to allow self-signed certificates (recommended for testing)
},
},
verbose: true,
strict: true,
});