improved UX + improved performance
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Collection_ownerId_idx" ON "Collection"("ownerId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "UsersAndCollections_userId_idx" ON "UsersAndCollections"("userId");
|
||||
@@ -0,0 +1,2 @@
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Tag_ownerId_idx" ON "Tag"("ownerId");
|
||||
@@ -93,6 +93,8 @@ model Collection {
|
||||
links Link[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
||||
@@index([ownerId])
|
||||
}
|
||||
|
||||
model UsersAndCollections {
|
||||
@@ -107,6 +109,7 @@ model UsersAndCollections {
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
||||
@@id([userId, collectionId])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model Link {
|
||||
@@ -139,6 +142,7 @@ model Tag {
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
||||
@@unique([name, ownerId])
|
||||
@@index([ownerId])
|
||||
}
|
||||
|
||||
model Subscription {
|
||||
|
||||
Reference in New Issue
Block a user