Database
Updated to just use DATABASE_* in everything other than local docker.
This commit is contained in:
19 files changed
+120
-56
No files matched your search
+7
-1
@@ -1,6 +1,12 @@
|
||||
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: {
|
||||
@@ -8,6 +14,6 @@ export default defineConfig({
|
||||
seed: "tsx prisma/seed.ts",
|
||||
},
|
||||
datasource: {
|
||||
url: process.env["DATABASE_URL"],
|
||||
url: buildMysqlConnectionUrl(),
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user