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

// Prisma 7 moved the datasource connection URL and seed config out of
// schema.prisma / package.json into this file. `import "dotenv/config"` is
// required because Prisma 7 no longer auto-loads .env. The runtime database
// connection itself is made via the driver adapter in src/config/database.ts.
export default defineConfig({
  schema: "prisma/schema.prisma",
  datasource: {
    url: env("DATABASE_URL"),
  },
  migrations: {
    seed: "tsx prisma/seed.ts",
  },
});
