🗃️ db: update schema for new collection

This commit is contained in:
2026-03-27 22:56:18 +07:00
parent dade012888
commit e798338107
2 changed files with 18 additions and 1 deletions

View File

@ -418,7 +418,8 @@ model UserLog {
model Collection {
id String @id @db.Uuid
name String @db.VarChar(255)
name String @db.VarChar(115)
slug String @db.VarChar(115)
medias Media[] @relation("MediaCollections")
owner User @relation("UserCollections", fields: [ownerId], references: [id])
ownerId String @db.Uuid
@ -429,6 +430,8 @@ model Collection {
deletedAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
@@unique([slug, ownerId])
@@map("collections")
}