File tree Expand file tree Collapse file tree 17 files changed +51
-1263
lines changed Expand file tree Collapse file tree 17 files changed +51
-1263
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66 "author" : " " ,
77 "main" : " index.js" ,
88 "scripts" : {
9- "start" : " tsx ./src/script.ts" ,
9+ "start" : " ts-node ./src/script.ts" ,
1010 "test" : " jest" ,
1111 "test:watch" : " jest --watch"
1212 },
1313 "dependencies" : {
14- "@prisma/adapter-pg" : " 6.20.0-integration-next.3" ,
15- "@prisma/client" : " 6.20.0-integration-next.3" ,
16- "dotenv" : " 16.6.1" ,
14+ "@prisma/client" : " 6.9.0" ,
1715 "jest" : " 29.7.0"
1816 },
1917 "devDependencies" : {
2018 "@types/jest" : " 29.5.14" ,
2119 "@types/node" : " 22.19.0" ,
2220 "@types/prettyjson" : " 0.0.33" ,
2321 "prettyjson" : " 1.2.5" ,
24- "prisma" : " 6.20.0-integration-next.3 " ,
22+ "prisma" : " 6.9.0 " ,
2523 "ts-jest" : " 29.4.5" ,
26- "tsx" : " ^4.20.6" ,
24+ "ts-node" : " 10.9.2" ,
25+ "ts-node-dev" : " 2.0.0" ,
2726 "typescript" : " 5.8.2"
2827 }
29- }
28+ }
Original file line number Diff line number Diff line change 11generator client {
2- provider = " prisma-client "
3- output = " ./generated "
4- engineType = " client "
2+ provider = " prisma-client-js "
53}
64
75datasource db {
@@ -27,7 +25,7 @@ model Post {
2725 authorId String
2826 author User @relation (fields : [authorId ] , references : [id ] )
2927 comments Comment []
30- tags Tag []
28+ tags Tag []
3129}
3230
3331model Comment {
Original file line number Diff line number Diff line change 1- import { PrismaClient } from '../ prisma/generated /client'
1+ import { PrismaClient } from '@ prisma/client'
22import prettyjson from 'prettyjson'
3- import { PrismaPg } from '@prisma/adapter-pg'
4- import 'dotenv/config'
53
6- const adapter = new PrismaPg ( {
7- connectionString : process . env . DATABASE_URL ,
8- } )
9- const prisma = new PrismaClient ( {
10- adapter,
11- } )
4+ const prisma = new PrismaClient ( )
125
136// A `main` function so that we can use async/await
147async function main ( ) {
Original file line number Diff line number Diff line change 1- import { PrismaClient } from '../prisma/generated/client'
2- import { PrismaPg } from '@prisma/adapter-pg'
3- import 'dotenv/config'
1+ import { PrismaClient } from '@prisma/client'
42
5- const adapter = new PrismaPg ( {
6- connectionString : process . env . DATABASE_URL ,
7- } )
8- export const prisma = new PrismaClient ( {
9- adapter,
10- } )
3+ export const prisma = new PrismaClient ( )
114
125describe ( 'example test with Prisma Client' , ( ) => {
136 beforeAll ( async ( ) => {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33 "version" : " 1.0.0" ,
44 "license" : " MIT" ,
55 "scripts" : {
6- "dev" : " tsx script.ts" ,
6+ "dev" : " ts-node script.ts" ,
77 "test" : " jest" ,
88 "test:watch" : " jest --watch"
99 },
1010 "devDependencies" : {
11- "@types/node" : " 22.18.12 " ,
12- "prisma" : " 6.20.0-integration-next.3 " ,
11+ "@types/node" : " 22.19.0 " ,
12+ "prisma" : " 6.9.0 " ,
1313 "supabase" : " 2.30.4" ,
14- "typescript " : " 5.8 .2" ,
15- "tsx " : " ^4.20.6 "
14+ "ts-node " : " 10.9 .2" ,
15+ "typescript " : " 5.8.2 "
1616 },
1717 "dependencies" : {
18- "@prisma/adapter-pg" : " 6.20.0-integration-next.3" ,
19- "@prisma/client" : " 6.20.0-integration-next.3"
18+ "@prisma/client" : " 6.9.0"
19+ },
20+ "prisma" : {
21+ "seed" : " ts-node prisma/seed.ts"
2022 }
21- }
23+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22// learn more about it in the docs: https://pris.ly/d/prisma-schema
33
44generator client {
5- provider = " prisma-client "
6- output = " ./generated "
7- engineType = " client "
5+ provider = " prisma-client-js "
86}
97
108datasource db {
11- provider = " postgresql "
12- url = env (" DATABASE_URL " )
9+ provider = " postgresql "
10+ url = env (" DATABASE_URL " )
1311}
1412
1513model User {
Original file line number Diff line number Diff line change 1- import { PrismaClient , Prisma } from './generated/client'
2- import { PrismaPg } from "@prisma/adapter-pg"
1+ import { PrismaClient , Prisma } from '@prisma/client'
32
4- const adapter = new PrismaPg ( {
5- connectionString : process . env . DATABASE_URL ,
6- } )
7- const prisma = new PrismaClient ( {
8- adapter,
9- } ) ;
3+ const prisma = new PrismaClient ( ) ;
104
115const userData = [
126 {
You can’t perform that action at this time.
0 commit comments