You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix singleton lists to use Int @id@default(1) matching Keystone 6 (#352)
* Fix singleton lists to use Int @id@default(1) matching Keystone 6 behaviour
Singleton lists (isSingleton: true) previously generated String @id@default(cuid())
in the Prisma schema, which differed from Keystone 6's Int @id with a value always
set to 1. This caused data loss issues when migrating from Keystone 6 as the integer
primary key could not be automatically converted to text.
Changes:
- Prisma schema generator now emits `Int @id@default(1)` for singleton lists
- Context create function injects `id: 1` into singleton record creation data
- Types generator uses `id: number` in Output type for singleton lists
- Blog example schema updated to reflect new singleton ID type
- Tests updated to use numeric ID (1) for singleton records
- Added explicit tests for singleton schema generation
Fixes#350https://claude.ai/code/session_01Keyrjjdhy3ypkZNzeg34re
* Run pnpm format
https://claude.ai/code/session_01Keyrjjdhy3ypkZNzeg34re
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments