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:
parent
b95f5be3a6
commit
216d2be4f8
14
drizzle.config.ts
Normal file
14
drizzle.config.ts
Normal 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,
|
||||||
|
},
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user