feat: add Drizzle ORM configuration for PostgreSQL integration in backend

This commit is contained in:
Mathis HERRIOT
2026-01-05 12:08:01 +01:00
parent 07f905d7c9
commit 43b4334971

19
backend/drizzle.config.ts Normal file
View 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,
});