-
Notifications
You must be signed in to change notification settings - Fork 1
chore: Prisma 7 #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Prisma 7 #864
Changes from all commits
b29a7bf
072ae76
c8d4f22
f388646
91b3231
348b56d
200cb49
8c7d6ee
70b6604
0336555
e4da28b
a391710
5cbac3b
6ceb16f
20f5d71
5cb0f21
f6895ad
3516643
7c856f9
00233cb
b7c26b8
7cbf4e2
3c94f56
db530d0
b282309
90a6fc0
067096c
7d7ff39
6454bd3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| DATABASE_URL=postgresql://testuser:pass@localhost:26257/test | ||
| DATABASE_URL=postgresql://testuser:pass@localhost:26257/test?sslmode=no-verify | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ node_modules | |
| dist | ||
| coverage | ||
| .eslintcache | ||
| test/db-client/** | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,4 +10,10 @@ services: | |
| - COCKROACH_PASSWORD=pass | ||
| - COCKROACH_USER=testuser | ||
| - COCKROACH_DATABASE=test | ||
| healthcheck: | ||
| test: [ "CMD-SHELL", "cockroach sql --host=127.0.0.1:26257 --certs-dir=certs -e 'SELECT 1;' || exit 1" ] | ||
| interval: 3s # run check every 3 seconds | ||
| timeout: 5s # fail if longer than 5s | ||
| retries: 10 # require 10 consecutive failures before unhealthy | ||
| start_period: 10s # grace period for initialization | ||
|
Comment on lines
+13
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n packages/app/prisma-utils/docker-compose.ymlRepository: lokalise/shared-ts-libs Length of output: 898 🏁 Script executed: rg -n "cockroach|certs-dir|cockroach-certs|start-single-node|--insecure" -S --type yamlRepository: lokalise/shared-ts-libs Length of output: 733 🏁 Script executed: fd -a "certs" .Repository: lokalise/shared-ts-libs Length of output: 49 CockroachDB healthcheck will fail—no certificates exist for secure mode. The container runs in secure mode (no Either add ✅ Example fix (insecure dev mode)- command: start-single-node --cluster-name=example-single-node
+ command: start-single-node --insecure --cluster-name=example-single-node
healthcheck:
- test: [ "CMD-SHELL", "cockroach sql --host=127.0.0.1:26257 --certs-dir=certs -e 'SELECT 1;' || exit 1" ]
+ test: [ "CMD-SHELL", "cockroach sql --insecure --host=127.0.0.1:26257 -e 'SELECT 1;' || exit 1" ]🤖 Prompt for AI Agents |
||
| restart: on-failure | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import 'dotenv/config' | ||
| import { defineConfig, env } from 'prisma/config' | ||
|
|
||
| // biome-ignore lint/style/noDefaultExport: prisma config requires default export | ||
| export default defineConfig({ | ||
| datasource: { url: env('DATABASE_URL') }, | ||
| schema: './schema.prisma', | ||
| migrations: { | ||
| path: './migrations', | ||
| }, | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,16 @@ | ||
| // This is your Prisma schema file, | ||
| // learn more about it in the docs: https://pris.ly/d/prisma-schema | ||
|
|
||
| generator client { | ||
| provider = "prisma-client-js" | ||
| previewFeatures = ["metrics"] | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed from Prisma 7 |
||
| } | ||
|
|
||
| datasource db { | ||
| provider = "cockroachdb" | ||
| url = env("DATABASE_URL") | ||
| relationMode = "prisma" | ||
| } | ||
|
|
||
| generator client { | ||
| provider = "prisma-client" | ||
| output = "../test/db-client" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Output is now mandatory |
||
| } | ||
|
|
||
| model Item1 { | ||
| id String @id @unique @default(dbgenerated("gen_random_ulid()")) @db.Uuid | ||
| value String | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prisma/prisma#27611