From 6638f3af887804b9bd7eafd6ad3a59494fc6dd51 Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 13 Feb 2024 11:36:08 -0500 Subject: [PATCH] fix: primaryKey type check --- packages/db/src/runtime/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/db/src/runtime/types.ts b/packages/db/src/runtime/types.ts index 77de3657f9..d0a0c34d78 100644 --- a/packages/db/src/runtime/types.ts +++ b/packages/db/src/runtime/types.ts @@ -89,7 +89,7 @@ export type Table< name: K; hasDefault: TFields[K] extends { default: NonNullable } ? true - : TFields[K] extends { primaryKey: true } + : TFields[K]['schema'] extends { primaryKey: true } ? true : false; notNull: TFields[K]['schema']['optional'] extends true ? false : true;