AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): Remove useless agent marketplace indices (#9608)
Zamil Majdyf9d88d298100
diff --git a/autogpt_platform/backend/migrations/20250310095931_delete_duplicate_indices/migration.sql b/autogpt_platform/backend/migrations/20250310095931_delete_duplicate_indices/migration.sqlnew file mode 100644index 0000000000..981ee6c859--- /dev/null+++ b/autogpt_platform/backend/migrations/20250310095931_delete_duplicate_indices/migration.sql@@ -0,0 +1,11 @@+-- DropIndex+DROP INDEX "APIKey_userId_idx";++-- DropIndex+DROP INDEX "StoreListing_agentId_owningUserId_idx";++-- DropIndex+DROP INDEX "StoreListing_isDeleted_idx";++-- DropIndex+DROP INDEX "StoreListingVersion_agentId_agentVersion_isDeleted_idx";diff --git a/autogpt_platform/backend/schema.prisma b/autogpt_platform/backend/schema.prismaindex bbb54302b0..79af7c976e 100644--- a/autogpt_platform/backend/schema.prisma+++ b/autogpt_platform/backend/schema.prisma@@ -619,11 +619,9 @@ model StoreListing {// Unique index on agentId to ensure only one listing per agent, regardless of number of versions the agent has.@@unique([agentId])- @@index([agentId, owningUserId])@@index([owningUserId])// Used in the view query@@index([isDeleted, isApproved])- @@index([isDeleted])}model StoreListingVersion {@@ -664,7 +662,6 @@ model StoreListingVersion {StoreListingReview StoreListingReview[]@@unique([agentId, agentVersion])- @@index([agentId, agentVersion, isDeleted])}model StoreListingReview {@@ -740,7 +737,6 @@ model APIKey {@@index([key])@@index([prefix])- @@index([userId])@@index([status])@@index([userId, status])}