Merge branch 'main' into feature-style-panel-layout

This commit is contained in:
Oleg Isonen committed 2022-09-05 20:36:17 +02:00
commit f17ea9e20b
3 files changed
+96 -1

No files matched your search

+2 -1
View File
@@ -14,7 +14,8 @@
"prettier": "prettier \"*.{js,md,json,ts}\" \"{docs,app}/**/*.{js,md,json,ts}\"",
"storybook:run": "start-storybook -p 6006",
"storybook:build": "build-storybook",
"migrations": "migrations --dev"
"migrations": "migrations --dev",
"migrations:deploy": "migrations migrate"
},
"dependencies": {
"@lexical/react": "^0.3.5",
@@ -0,0 +1,11 @@
import { PrismaClient } from "./client";
export default () => {
const client = new PrismaClient();
return client.$transaction(async (prisma) => {
const usersCount = await prisma.user.count();
// eslint-disable-next-line no-console
console.log("Example noop migration test", { usersCount });
});
};
@@ -0,0 +1,83 @@
// 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("[]")
}