-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrizzle.config.ts
28 lines (21 loc) · 930 Bytes
/
drizzle.config.ts
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
// Import the 'config' function from the 'dotenv' package to load environment variables from a .env file
import { config } from "dotenv";
// Import the 'defineConfig' function from the 'drizzle-kit' package to define the configuration for the database
import { defineConfig } from "drizzle-kit";
// Load environment variables from the .env.local file
config({ path: ".env.local" });
// Export the database configuration using 'defineConfig' from 'drizzle-kit'
export default defineConfig({
// Path to the database schema file
schema: "./db/schema.ts",
// Specify the database dialect (in this case, PostgreSQL)
dialect: "postgresql",
// Database credentials, with the URL being loaded from an environment variable
dbCredentials: {
url: process.env.DATABASE_URL!
},
// Enable verbose logging for debugging purposes
verbose: true,
// Enable strict mode for additional safety checks
strict: true
});