diff --git a/packages/db/prisma/schema.prisma b/packages/db/prisma/schema.prisma index cb9d7afec..c48bccadd 100644 --- a/packages/db/prisma/schema.prisma +++ b/packages/db/prisma/schema.prisma @@ -225,8 +225,6 @@ model Result { logs Log[] @@index([typebotId]) - @@index([typebotId, createdAt]) - @@index([createdAt, typebotId]) } model Log { @@ -253,7 +251,6 @@ model Answer { @@unique([resultId, blockId, groupId]) @@index([groupId]) - @@index([storageUsed]) } model Coupon { @@ -263,14 +260,16 @@ model Coupon { } model Webhook { - id String @id @default(cuid()) + id String @id @default(cuid()) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt url String? method String queryParams Json headers Json body String? typebotId String - typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade) + typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade) } model ClaimableCustomPlan { diff --git a/packages/models/features/webhooks.ts b/packages/models/features/webhooks.ts index 5713ba72d..98c8914a4 100644 --- a/packages/models/features/webhooks.ts +++ b/packages/models/features/webhooks.ts @@ -16,7 +16,7 @@ export type KeyValue = { id: string; key?: string; value?: string } export type Webhook = Omit< WebhookFromPrisma, - 'queryParams' | 'headers' | 'method' + 'queryParams' | 'headers' | 'method' | 'createdAt' | 'updatedAt' > & { queryParams: KeyValue[] headers: KeyValue[]