import "dotenv/config";
import path from "node:path";
import { defineConfig } from "prisma/config";

const databaseUrl =
  process.env["DATABASE_URL"] ?? `file:${path.resolve("prisma/dev.db")}`;

export default defineConfig({
  schema: "prisma/schema.prisma",
  migrations: {
    path: "prisma/migrations",
  },
  datasource: {
    url: databaseUrl,
  },
});
