Skip to content

Commit 1d7827f

Browse files
Revert "update cockroachdb, postgresql-supabase, prisma-postgres examples (#8374)" (#8384)
1 parent 042d233 commit 1d7827f

File tree

17 files changed

+51
-1263
lines changed

17 files changed

+51
-1263
lines changed

databases/cockroachdb/bun.lock

Lines changed: 0 additions & 754 deletions
This file was deleted.

databases/cockroachdb/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@
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+
}

databases/cockroachdb/prisma/schema.prisma

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
generator client {
2-
provider = "prisma-client"
3-
output = "./generated"
4-
engineType = "client"
2+
provider = "prisma-client-js"
53
}
64

75
datasource 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

3331
model Comment {

databases/cockroachdb/src/script.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import { PrismaClient } from '../prisma/generated/client'
1+
import { PrismaClient } from '@prisma/client'
22
import 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
147
async function main() {

databases/cockroachdb/tests/prisma.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
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

125
describe('example test with Prisma Client', () => {
136
beforeAll(async () => {

databases/postgresql-supabase/bun.lock

Lines changed: 0 additions & 245 deletions
This file was deleted.

databases/postgresql-supabase/package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@
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+
}

databases/postgresql-supabase/prisma.config.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

databases/postgresql-supabase/prisma/schema.prisma

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
// learn more about it in the docs: https://pris.ly/d/prisma-schema
33

44
generator client {
5-
provider = "prisma-client"
6-
output = "./generated"
7-
engineType = "client"
5+
provider = "prisma-client-js"
86
}
97

108
datasource db {
11-
provider = "postgresql"
12-
url = env("DATABASE_URL")
9+
provider = "postgresql"
10+
url = env("DATABASE_URL")
1311
}
1412

1513
model User {

databases/postgresql-supabase/prisma/seed.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
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

115
const userData = [
126
{

0 commit comments

Comments
 (0)