-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add option to use BigInt in autoincrement idField #7188
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/8yuTCNpCzaTZTQz9iLbSCZLzf3Z5 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit d4f4661:
|
🦋 Changeset detectedLatest commit: d4f4661 The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Awesome work on this @MurzNN! Thinking about it, I think we would want to add a For example db: {
idField: {
kind: 'autoincrement',
type: 'Int' | 'BigInt' // the underlying Prisma type, the default is 'Int' when `kind: 'autoincrement'`
}
} This will then be aligned with other advanced changes we intend to add, for example with our other work |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@dcousens yeah, adding type will simplify the whole construction, but will require more changes in core, but seems it almost implemented already, thanks! |
Now for
autoincrement
idField only Integer field type is used, which sometimes is not enough.In this PR I've implemented an option "useBigInt" in
idField
configuration, that switches to use BigInt as idField in database. Here is an example how to enable this feature:Related discussion: #6969