20 lines
670 B
TypeScript
20 lines
670 B
TypeScript
import "dotenv/config";
|
|
import { defineConfig } from "prisma/config";
|
|
import { buildMysqlConnectionUrl } from "./src/lib/db/mysql-pool-config";
|
|
|
|
// The Prisma CLI (migrate/introspect) needs a connection string, not
|
|
// discrete fields — this app's own runtime code never uses this URL (see
|
|
// src/lib/db/mysql-pool-config.ts's buildMysqlPoolConfig, which reads
|
|
// DATABASE_HOST/PORT/NAME/USER/PASSWORD directly), so it's built here only
|
|
// to satisfy the CLI.
|
|
export default defineConfig({
|
|
schema: "prisma/schema.prisma",
|
|
migrations: {
|
|
path: "prisma/migrations",
|
|
seed: "tsx prisma/seed.ts",
|
|
},
|
|
datasource: {
|
|
url: buildMysqlConnectionUrl(),
|
|
},
|
|
});
|