2
0

🦴 Add theme page backbone

This commit is contained in:
Baptiste Arnaud
2021-12-23 09:37:42 +01:00
parent 6ee0647384
commit 30ddb143b4
35 changed files with 784 additions and 87 deletions

View File

@ -4,16 +4,17 @@
"main": "./index.tsx",
"types": "./index.tsx",
"devDependencies": {
"prisma": "latest",
"prisma": "^3.7.0",
"ts-node": "^10.4.0",
"typescript": "^4.5.4"
},
"dependencies": {
"@prisma/client": "latest"
"@prisma/client": "^3.7.0"
},
"scripts": {
"dev": "yarn prisma db push && BROWSER=none yarn prisma studio",
"build": "prisma generate && prisma migrate deploy",
"migration:push": "dotenv -e ../../.env yarn prisma db push",
"migration:create": "dotenv -e ../../.env yarn prisma migrate dev",
"migration:reset": "dotenv -e ../../.env yarn prisma migrate reset"
}

View File

@ -0,0 +1,12 @@
/*
Warnings:
- Added the required column `theme` to the `PublicTypebot` table without a default value. This is not possible if the table is not empty.
- Added the required column `theme` to the `Typebot` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "PublicTypebot" ADD COLUMN "theme" JSONB NOT NULL;
-- AlterTable
ALTER TABLE "Typebot" ADD COLUMN "theme" JSONB NOT NULL;

View File

@ -89,6 +89,7 @@ model Typebot {
folder DashboardFolder? @relation(fields: [folderId], references: [id])
blocks Json[]
startBlock Json
theme Json
}
model PublicTypebot {
@ -98,14 +99,15 @@ model PublicTypebot {
name String
blocks Json[]
startBlock Json
theme Json
}
model Result {
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
typebotId String
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
answers Json[]
id String @id @default(cuid())
createdAt DateTime @default(now())
updatedAt DateTime @default(now())
typebotId String
typebot Typebot @relation(fields: [typebotId], references: [id], onDelete: Cascade)
answers Json[]
isCompleted Boolean?
}