18 lines
608 B
TypeScript
18 lines
608 B
TypeScript
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { config as loadEnv } from 'dotenv';
|
|
import { defineConfig } from 'prisma/config';
|
|
|
|
// Load the repo-root .env so DATABASE_URL is visible when Prisma CLI runs
|
|
// from inside packages/db. The .env file is intentionally kept at the repo
|
|
// root (single source of truth, gitignored).
|
|
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
loadEnv({ path: path.resolve(here, '../../.env') });
|
|
|
|
export default defineConfig({
|
|
schema: path.join('prisma', 'schema.prisma'),
|
|
migrations: {
|
|
seed: 'tsx prisma/seed.ts',
|
|
},
|
|
});
|