Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit c02a755

Browse files
committed
refactor(auth_providers): split providerData into uniqueData and additionalData
1 parent 05d61ff commit c02a755

File tree

25 files changed

+672
-262
lines changed

25 files changed

+672
-262
lines changed

modules/auth_providers/config.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

modules/auth_providers/db/migrations/20240629231731_init/migration.sql

Lines changed: 0 additions & 15 deletions
This file was deleted.

modules/auth_providers/db/schema.prisma

Lines changed: 0 additions & 16 deletions
This file was deleted.

modules/auth_providers/module.json

Lines changed: 0 additions & 48 deletions
This file was deleted.

modules/auth_providers/scripts/add_provider_to_user.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

modules/auth_providers/scripts/get_provider_data.ts

Lines changed: 0 additions & 44 deletions
This file was deleted.

modules/auth_providers/scripts/list_providers.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.

modules/auth_providers/scripts/set_provider_data.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

modules/auth_providers/utils/types.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- CreateTable
2+
CREATE TABLE "UserIdentities" (
3+
"userId" UUID NOT NULL,
4+
"identityType" TEXT NOT NULL,
5+
"identityId" TEXT NOT NULL,
6+
"uniqueData" JSONB NOT NULL,
7+
"additionalData" JSONB NOT NULL,
8+
9+
CONSTRAINT "UserIdentities_pkey" PRIMARY KEY ("userId","identityType","identityId")
10+
);
11+
12+
-- CreateIndex
13+
CREATE INDEX "UserIdentities_userId_idx" ON "UserIdentities"("userId");
14+
15+
-- CreateIndex
16+
CREATE INDEX "UserIdentities_identityType_identityId_idx" ON "UserIdentities"("identityType", "identityId");
17+
18+
-- CreateIndex
19+
CREATE INDEX "UserIdentities_identityType_identityId_uniqueData_idx" ON "UserIdentities"("identityType", "identityId", "uniqueData");
20+
21+
-- CreateIndex
22+
CREATE UNIQUE INDEX "UserIdentities_identityType_identityId_uniqueData_key" ON "UserIdentities"("identityType", "identityId", "uniqueData");

0 commit comments

Comments
 (0)