refactor(library): remove unnecessary indexes from LibraryFolder model and migration

- Removed the `@@index` directives for `userId` and `parentId` from the `LibraryFolder` model in `schema.prisma` to streamline the database schema.
- Updated the migration SQL file to reflect these changes, ensuring a cleaner migration process.
- These modifications enhance the efficiency of the database structure by eliminating redundant indexing.
This commit is contained in:
abhi1992002
2026-02-17 10:28:43 +05:30
parent 090975374c
commit 792e141183
2 changed files with 0 additions and 19 deletions

View File

@@ -1,18 +1,6 @@
/*
Warnings:
- You are about to drop the column `search` on the `StoreListingVersion` table. All the data in the column will be lost.
*/
-- DropIndex
DROP INDEX "UnifiedContentEmbedding_search_idx";
-- AlterTable
ALTER TABLE "LibraryAgent" ADD COLUMN "folderId" TEXT;
-- AlterTable
ALTER TABLE "StoreListingVersion" DROP COLUMN "search";
-- CreateTable
CREATE TABLE "LibraryFolder" (
"id" TEXT NOT NULL,
@@ -28,11 +16,6 @@ CREATE TABLE "LibraryFolder" (
CONSTRAINT "LibraryFolder_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "LibraryFolder_userId_isDeleted_idx" ON "LibraryFolder"("userId", "isDeleted");
-- CreateIndex
CREATE INDEX "LibraryFolder_parentId_idx" ON "LibraryFolder"("parentId");
-- CreateIndex
CREATE UNIQUE INDEX "LibraryFolder_userId_parentId_name_key" ON "LibraryFolder"("userId", "parentId", "name");

View File

@@ -435,8 +435,6 @@ model LibraryFolder {
LibraryAgents LibraryAgent[]
@@unique([userId, parentId, name]) // Name unique per parent per user
@@index([userId, isDeleted])
@@index([parentId])
}
////////////////////////////////////////////////////////////