feat(db): configure drizzle orm and postgres connection

This commit is contained in:
lila 2026-03-24 10:59:03 +01:00
parent 3faa3d4ffb
commit a8e247829c
4 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1,15 @@
import { config } from "dotenv";
import { defineConfig } from "drizzle-kit";
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
config({
path: resolve(dirname(fileURLToPath(import.meta.url)), "../../.env"),
});
export default defineConfig({
out: "./drizzle",
schema: "./src/schema.ts",
dialect: "postgresql",
dbCredentials: { url: process.env["DATABASE_URL"]! },
});