Allow items to have multiple uploads linked
This commit is contained in:
parent
51bc4b82d0
commit
ef0506d7c6
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `uploadId` on the `Item` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropIndex
|
||||||
|
DROP INDEX "Upload.itemId_unique";
|
@ -176,7 +176,7 @@ model Upload {
|
|||||||
size Int
|
size Int
|
||||||
width Int?
|
width Int?
|
||||||
height Int?
|
height Int?
|
||||||
itemId Int? @unique(map: "Upload.itemId_unique")
|
itemId Int?
|
||||||
userId Int
|
userId Int
|
||||||
item Item? @relation(fields: [itemId], references: [id])
|
item Item? @relation(fields: [itemId], references: [id])
|
||||||
user User @relation("Uploads", fields: [userId], references: [id], onDelete: Cascade)
|
user User @relation("Uploads", fields: [userId], references: [id], onDelete: Cascade)
|
||||||
@ -299,7 +299,7 @@ model Item {
|
|||||||
PollOption PollOption[]
|
PollOption PollOption[]
|
||||||
PollVote PollVote[]
|
PollVote PollVote[]
|
||||||
ThreadSubscription ThreadSubscription[]
|
ThreadSubscription ThreadSubscription[]
|
||||||
upload Upload?
|
uploads Upload[]
|
||||||
User User[]
|
User User[]
|
||||||
itemForwards ItemForward[]
|
itemForwards ItemForward[]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user