Skip to content

Commit

Permalink
Merge pull request #86 from koyopro/feature/prisma6
Browse files Browse the repository at this point in the history
[accel-record] Support Prisma 6.0
  • Loading branch information
koyopro authored Dec 15, 2024
2 parents bc65bfa + 8b1f62a commit 217f696
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 43 deletions.
7 changes: 7 additions & 0 deletions .changeset/early-sloths-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"prisma-generator-accel-record": minor
"accel-record-core": minor
"accel-record": minor
---

Support Prisma 6.0
74 changes: 37 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"vitest": "^1.3.0"
},
"dependencies": {
"@prisma/client": "^5.9.1",
"@prisma/client": ">=5.9.1",
"bcrypt-ts": "^5.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/accel-record-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"bcrypt-ts": "^5.0.0",
"get-port": "^7.0.0",
"knex": "^3.0.0",
"prisma": "^5.0.0",
"prisma": ">=5.0.0",
"sync-actions": "^1.0.0",
"uuid": "^11.0.0"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/accel-record-core/src/model/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ export class Field {
* @returns True if the default value is "uuid7", false otherwise.
*/
get defaultIsUuid7() {
return this.default != undefined && this.default.name === "uuid(7)";
if (!this.default) return false;
if (this.default.name === "uuid(7)") return true;
return this.default.name === "uuid" && this.default.args[0] == 7;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/prisma-generator-accel-record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"dist"
],
"dependencies": {
"@prisma/client": "^5.0.0",
"@prisma/generator-helper": "^5.0.0",
"@prisma/client": ">=5.0.0",
"@prisma/generator-helper": ">=5.0.0",
"esbuild": ">=0.21.0",
"prettier": "^3.0.0"
},
"devDependencies": {
"@types/node": "^17.0.0",
"prisma": "^5.0.0",
"prisma": ">=5.0.0",
"typescript": "^5.0.0"
},
"author": "koyopro",
Expand Down

0 comments on commit 217f696

Please sign in to comment.