feat: Add Drizzle configuration file

This commit introduces a new Drizzle configuration file, 'drizzle.config.ts'. It establishes the schema path, output directory, dialect, and database credentials (such as host, user, password, and database) using environment variables.
This commit is contained in:
Mathis H (Avnyr) 2024-07-09 13:43:25 +02:00
parent b95f5be3a6
commit 216d2be4f8
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

14
drizzle.config.ts Normal file
View File

@ -0,0 +1,14 @@
import { defineConfig } from 'drizzle-kit';
import * as process from "node:process";
export default defineConfig({
schema: './src/drizzle/schema.ts',
out: './drizzle',
dialect: 'postgresql',
dbCredentials: {
host: `${process.env.POSTGRES_HOST}:${process.env.POSTGRES_PORT}`,
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
database: process.env.POSTGRES_DATABASE,
},
});