Skip to content

Commit

Permalink
update migration
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Sharma <[email protected]>
  • Loading branch information
vsvishalsharma committed Jul 19, 2024
1 parent 9cfb74b commit 09ae462
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 157 deletions.

This file was deleted.

71 changes: 0 additions & 71 deletions prisma/migrations/20240705072819_/migration.sql

This file was deleted.

2 changes: 0 additions & 2 deletions prisma/migrations/20240718151011_add_attributes/migration.sql

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions prisma/migrations/20240718155719_add_govid_to_schema/migration.sql

This file was deleted.

2 changes: 0 additions & 2 deletions prisma/migrations/20240719073117_add_attributes/migration.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ CREATE TABLE "Organization" (
"namespaceId" TEXT NOT NULL,
"assuranceLevelId" TEXT NOT NULL,
"onboardedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"attributes" JSONB,

CONSTRAINT "Organization_pkey" PRIMARY KEY ("id")
);
Expand All @@ -33,21 +34,13 @@ CREATE TABLE "Schema" (
"name" TEXT NOT NULL,
"type" "SchemaType" NOT NULL,
"w3cUri" TEXT,
"anonCredsDefinitionId" TEXT,
"organizationId" TEXT NOT NULL,
"anonCredsSchemaId" TEXT,
"organizationId" TEXT,
"governanceAuthorityId" TEXT NOT NULL,

CONSTRAINT "Schema_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "RevocationRegistry" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"definition" JSONB NOT NULL,

CONSTRAINT "RevocationRegistry_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "Namespace" (
"id" TEXT NOT NULL,
Expand Down Expand Up @@ -96,7 +89,10 @@ ALTER TABLE "Organization" ADD CONSTRAINT "Organization_namespaceId_fkey" FOREIG
ALTER TABLE "Organization" ADD CONSTRAINT "Organization_assuranceLevelId_fkey" FOREIGN KEY ("assuranceLevelId") REFERENCES "AssuranceLevel"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Schema" ADD CONSTRAINT "Schema_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
ALTER TABLE "Schema" ADD CONSTRAINT "Schema_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Organization"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Schema" ADD CONSTRAINT "Schema_governanceAuthorityId_fkey" FOREIGN KEY ("governanceAuthorityId") REFERENCES "GovernanceAuthority"("id") ON DELETE RESTRICT ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "Namespace" ADD CONSTRAINT "Namespace_governanceAuthorityId_fkey" FOREIGN KEY ("governanceAuthorityId") REFERENCES "GovernanceAuthority"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
Expand Down

0 comments on commit 09ae462

Please sign in to comment.