0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-17 23:11:29 -05:00

fix: respect default in table types

This commit is contained in:
bholmesdev 2024-02-13 13:52:07 -05:00
parent f3089c3652
commit 03277b81e1

View file

@ -87,7 +87,7 @@ export type Table<
{
tableName: TTableName;
name: K;
hasDefault: TFields[K] extends { default: NonNullable<unknown> }
hasDefault: TFields[K]['schema'] extends { default: NonNullable<unknown> }
? true
: TFields[K]['schema'] extends { primaryKey: true }
? true