This commit is contained in:
Sara Vieira committed 2022-07-16 21:22:47 +02:00
1 parent fac027a20e
commit 49ca020bdf
3 files changed
+9 -5

No files matched your search

+2 -2
View File
@@ -32,8 +32,8 @@ export const create = async (
...values,
size,
format: metadata.format,
width: Math.round(metadata.width),
height: Math.round(metadata.height),
...(metadata.width ? { width: Math.round(metadata.width) } : {}),
...(metadata.height ? { height: Math.round(metadata.height) } : {}),
projectId,
},
});
@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "Asset" ALTER COLUMN "format" DROP NOT NULL,
ALTER COLUMN "height" DROP NOT NULL,
ALTER COLUMN "width" DROP NOT NULL;
+3 -3
View File
@@ -19,10 +19,10 @@ model Asset {
id String @id @default(uuid())
project Project @relation(fields: [projectId], references: [id])
projectId String
format String
format String?
size Int
width Int
height Int
width Int?
height Int?
name String
path String
alt String?