import type { Config } from "drizzle-kit";
import path from "node:path";

const dbPath = process.env.DATABASE_FILE
  ?? path.resolve(process.cwd(), "data", "moneyapp.db");

export default {
  schema: "./src/db/schema.ts",
  out: "./drizzle",
  dialect: "sqlite",
  dbCredentials: { url: dbPath },
  casing: "snake_case",
} satisfies Config;
