fix: don't dynamically populate document kind in schema (#769)

This commit is contained in:
Jeremy 2025-02-06 17:18:26 +03:00 committed by GitHub
parent dfc07ce0ae
commit 01f589b603
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 1 deletions

View file

@ -73,7 +73,9 @@ export const document = pgTable(
createdAt: timestamp('createdAt').notNull(),
title: text('title').notNull(),
content: text('content'),
kind: varchar('text', { enum: blockKinds }).notNull().default('text'),
kind: varchar('text', { enum: ['text', 'code', 'image', 'sheet'] })
.notNull()
.default('text'),
userId: uuid('userId')
.notNull()
.references(() => user.id),