diff --git a/apps/api/prisma/migrations/20260527113943_add_group_account_index/migration.sql b/apps/api/prisma/migrations/20260527113943_add_group_account_index/migration.sql new file mode 100644 index 0000000..76aeed8 --- /dev/null +++ b/apps/api/prisma/migrations/20260527113943_add_group_account_index/migration.sql @@ -0,0 +1,2 @@ +-- CreateIndex +CREATE INDEX "Group_accountId_idx" ON "Group"("accountId"); diff --git a/apps/api/prisma/schema.prisma b/apps/api/prisma/schema.prisma index 5f03b6b..4a6a6ff 100644 --- a/apps/api/prisma/schema.prisma +++ b/apps/api/prisma/schema.prisma @@ -4,7 +4,7 @@ generator client { datasource db { provider = "postgresql" - url = env("../../../DATABASE_URL") + url = env("DATABASE_URL") } model Group { @@ -25,6 +25,7 @@ model Group { consentRecords ConsentRecord[] @@unique([platform, platformId]) + @@index([accountId]) } model Message {