1 parent 9c9f33c commit 61d66b5Copy full SHA for 61d66b5
1 file changed
scripts/seed-demo-assessments.ts
@@ -4,9 +4,13 @@
4
* Usage: npx tsx scripts/seed-demo-assessments.ts <elderlyProfileId>
5
*/
6
7
-import { PrismaClient } from "@prisma/client";
+import { Pool } from "pg";
8
+import { PrismaPg } from "@prisma/adapter-pg";
9
+import { PrismaClient } from "../src/generated/prisma";
10
-const prisma = new PrismaClient();
11
+const pool = new Pool({ connectionString: process.env.DATABASE_URL });
12
+const adapter = new PrismaPg(pool);
13
+const prisma = new PrismaClient({ adapter });
14
15
function randomBetween(min: number, max: number) {
16
return Math.round((Math.random() * (max - min) + min) * 100) / 100;
0 commit comments