feat: add Drizzle ORM configuration for PostgreSQL integration in backend
This commit is contained in:
19
backend/drizzle.config.ts
Normal file
19
backend/drizzle.config.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { defineConfig } from 'drizzle-kit';
|
||||||
|
import * as process from "node:process";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
schema: './src/schemas',
|
||||||
|
out: '.migrations',
|
||||||
|
dialect: "postgresql",
|
||||||
|
casing: "snake_case",
|
||||||
|
dbCredentials: {
|
||||||
|
host: String(process.env.POSTGRES_HOST || "localhost"),
|
||||||
|
port: Number(process.env.POSTGRES_PORT || 5432),
|
||||||
|
database: String(process.env.POSTGRES_DB || "app"),
|
||||||
|
user: String(process.env.POSTGRES_USER || "app"),
|
||||||
|
password: String(process.env.POSTGRES_PASSWORD || "app"),
|
||||||
|
ssl: false,
|
||||||
|
},
|
||||||
|
verbose: true,
|
||||||
|
strict: true,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user