-
-
Notifications
You must be signed in to change notification settings - Fork 116
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(api): Change type of id field of models to uuid #232
Conversation
PR Description updated to latest commit (6868f2d) |
PR Review 🔍
|
PR Code Suggestions ✨
|
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.
You forgot to generate the migration files! Do so using pnpm db:generate-migrations
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.
Also, we would need the uuid to be v4 explicitely. Follow up the thread I dropped in the issue to understand how that works.
Using this should do the job, right? model Event {
id String @id @db.Uuid @default(dbgenerated("gen_random_uuid()"))
...
} |
I think you will need to use |
Both of the functions But to be specific about version, yes I think |
Wow! Okay I didn't know that, but yeah, staying version specific would help! |
6868f2d
to
e77dba3
Compare
Quality Gate passedIssues Measures |
User description
Description
Modified all the
id
fields inside each model in prisma and changed their types touuid
Fixes #231
Dependencies
Mention any dependencies/packages used
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
@rajdip-b
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
enhancement, dependencies
Description
id
fields fromcuid()
touuid()
in multiple Prisma models to ensure consistency and uniqueness.pnpm-lock.yaml
to reflect the changes.Changes walkthrough 📝
schema.prisma
Change `id` field default value to `uuid()` in Prisma models.
apps/api/src/prisma/schema.prisma
id
fields fromcuid()
touuid()
inmultiple models.
Event
,Notification
,User
,Subscription
,Integration
,Environment
,Project
,ProjectWorkspaceRoleAssociation
,WorkspaceRole
,WorkspaceMemberRoleAssociation
,WorkspaceMember
,SecretVersion
,Secret
,VariableVersion
,Variable
,ApiKey
,Otp
,Workspace
,Approval
, andChangeNotificationSocketMap
.pnpm-lock.yaml
Update dependencies in `pnpm-lock.yaml`.
pnpm-lock.yaml