🐛 (usage) Archive typebot to be able to compute usage
This commit is contained in:
committed by
Baptiste Arnaud
parent
75ca255af2
commit
15dbc9577d
@ -0,0 +1,11 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "Result" DROP CONSTRAINT "Result_typebotId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Result" ALTER COLUMN "isArchived" SET DEFAULT false;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Typebot" ADD COLUMN "isArchived" BOOLEAN NOT NULL DEFAULT false;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Result" ADD CONSTRAINT "Result_typebotId_fkey" FOREIGN KEY ("typebotId") REFERENCES "Typebot"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
@ -66,23 +66,23 @@ model ApiToken {
|
||||
}
|
||||
|
||||
model Workspace {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
icon String?
|
||||
createdAt DateTime @default(now())
|
||||
plan Plan @default(FREE)
|
||||
stripeId String? @unique
|
||||
credentials Credentials[]
|
||||
customDomains CustomDomain[]
|
||||
folders DashboardFolder[]
|
||||
members MemberInWorkspace[]
|
||||
typebots Typebot[]
|
||||
invitations WorkspaceInvitation[]
|
||||
additionalChatsIndex Int @default(0)
|
||||
additionalStorageIndex Int @default(0)
|
||||
chatsLimitFirstEmailSentAt DateTime?
|
||||
storageLimitFirstEmailSentAt DateTime?
|
||||
chatsLimitSecondEmailSentAt DateTime?
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
icon String?
|
||||
createdAt DateTime @default(now())
|
||||
plan Plan @default(FREE)
|
||||
stripeId String? @unique
|
||||
credentials Credentials[]
|
||||
customDomains CustomDomain[]
|
||||
folders DashboardFolder[]
|
||||
members MemberInWorkspace[]
|
||||
typebots Typebot[]
|
||||
invitations WorkspaceInvitation[]
|
||||
additionalChatsIndex Int @default(0)
|
||||
additionalStorageIndex Int @default(0)
|
||||
chatsLimitFirstEmailSentAt DateTime?
|
||||
storageLimitFirstEmailSentAt DateTime?
|
||||
chatsLimitSecondEmailSentAt DateTime?
|
||||
storageLimitSecondEmailSentAt DateTime?
|
||||
}
|
||||
|
||||
@ -168,6 +168,7 @@ model Typebot {
|
||||
publishedTypebot PublicTypebot?
|
||||
results Result[]
|
||||
webhooks Webhook[]
|
||||
isArchived Boolean @default(false)
|
||||
}
|
||||
|
||||
model Invitation {
|
||||
@ -211,8 +212,8 @@ model Result {
|
||||
variables Json[]
|
||||
isCompleted Boolean
|
||||
hasStarted Boolean?
|
||||
isArchived Boolean?
|
||||
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: NoAction)
|
||||
isArchived Boolean? @default(false)
|
||||
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
|
||||
answers Answer[]
|
||||
logs Log[]
|
||||
}
|
||||
|
Reference in New Issue
Block a user