Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

1.9 KB
Raw Blame
// DO NOT EDIT THIS FILE!
// This a copy of your schema.prisma that corresponds to the state of the database 
// when all migrations up until this one are applied.
// It's used to generate a Prisma Client for the migration.

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["interactiveTransactions"]
  output = "client"
}

datasource db {
  provider = "postgres"
  url      = env("DATABASE_URL")
}

model Team {
  id    String @id @default(uuid())
  users User[]
}

enum Location {
  FS
  REMOTE
}

model Asset {
  id        String   @id @default(uuid())
  project   Project  @relation(fields: [projectId], references: [id])
  projectId String
  format    String?
  size      Int
  width     Decimal?
  height    Decimal?
  name      String
  alt       String?
  location  Location
  createdAt DateTime @default(now())
}

model User {
  id        String    @id @default(uuid())
  email     String?   @unique
  provider  String?
  image     String?
  username  String?
  createdAt DateTime  @default(now())
  team      Team?     @relation(fields: [teamId], references: [id])
  teamId    String?
  projects  Project[]
}

model Project {
  id                String  @id @default(uuid())
  title             String
  domain            String  @unique
  prodTreeId        String? // exists when published
  devTreeId         String
  prodTreeIdHistory String  @default("[]")
  user              User?   @relation(fields: [userId], references: [id])
  userId            String?
  assets            Asset[]
}

model Tree {
  id   String @id @default(uuid())
  root String
}

model InstanceProps {
  id         String @id @default(uuid())
  instanceId String
  treeId     String
  props      String @default("[]")
}

model Breakpoints {
  treeId String @id @default(uuid())
  values String @default("[]")
}