migrate to prisma v7 (#345)

* migrate to prisma v7

* fix prisma type imports

* update prisma version in docker

* fix prisma cli breaking things
This commit is contained in:
Husky
2026-02-10 20:26:53 -05:00
committed by GitHub
parent e4a295f767
commit d1786b3c60
10 changed files with 678 additions and 126 deletions
+11 -4
View File
@@ -1,10 +1,17 @@
import { config } from "dotenv";
import type { PrismaConfig } from "prisma";
import { defineConfig } from "prisma/config";
import path from "node:path";
// load .env variables
config();
export default {
// need to use built in env access as prisma's env function throws when DATABASE_URL is undefined
// this is acceptable as prisma throws already it actually needs the URL
const databaseURL = process.env.DATABASE_URL;
export default defineConfig({
schema: path.join("prisma"),
earlyAccess: true,
} satisfies PrismaConfig;
datasource: {
url: databaseURL,
},
});