import { config } from "dotenv";
import { defineConfig } from "prisma/config";

// Load .env and .env.local so DATABASE_URL is available for CLI
config({ path: ".env" });
config({ path: ".env.local", override: true });

export default defineConfig({
  schema: "prisma/schema.prisma",
  migrations: {
    path: "prisma/migrations",
    seed: "tsx prisma/seed.ts",
  },
  datasource: {
    url: process.env["DATABASE_URL"],
  },
});
