From de8a02710a7f3e9b4743a5600e58ffc689318cd6 Mon Sep 17 00:00:00 2001 From: Nishad Shirsat <103021375+nishad-ayanworks@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:25:48 +0530 Subject: [PATCH] refactor: bulk issuance file data model (#264) * refactored file data model for status Signed-off-by: Nishad * refactored file data model for credentials Signed-off-by: Nishad --------- Signed-off-by: Nishad --- .../migrations/20231116112146_status_file_data/migration.sql | 4 ++++ .../20231116114452_credentials_file_data/migration.sql | 2 ++ libs/prisma-service/prisma/schema.prisma | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 libs/prisma-service/prisma/migrations/20231116112146_status_file_data/migration.sql create mode 100644 libs/prisma-service/prisma/migrations/20231116114452_credentials_file_data/migration.sql diff --git a/libs/prisma-service/prisma/migrations/20231116112146_status_file_data/migration.sql b/libs/prisma-service/prisma/migrations/20231116112146_status_file_data/migration.sql new file mode 100644 index 000000000..164da6ee3 --- /dev/null +++ b/libs/prisma-service/prisma/migrations/20231116112146_status_file_data/migration.sql @@ -0,0 +1,4 @@ +-- AlterTable +ALTER TABLE "file_data" ADD COLUMN "credDefId" TEXT, +ADD COLUMN "schemaId" TEXT, +ADD COLUMN "status" BOOLEAN NOT NULL DEFAULT false; diff --git a/libs/prisma-service/prisma/migrations/20231116114452_credentials_file_data/migration.sql b/libs/prisma-service/prisma/migrations/20231116114452_credentials_file_data/migration.sql new file mode 100644 index 000000000..48452a863 --- /dev/null +++ b/libs/prisma-service/prisma/migrations/20231116114452_credentials_file_data/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "file_data" ADD COLUMN "credential_data" JSONB; diff --git a/libs/prisma-service/prisma/schema.prisma b/libs/prisma-service/prisma/schema.prisma index fcef6ebce..84bee79d9 100644 --- a/libs/prisma-service/prisma/schema.prisma +++ b/libs/prisma-service/prisma/schema.prisma @@ -442,4 +442,8 @@ model file_data { deletedAt DateTime? @db.Timestamp(6) fileUploadId String fileUpload file_upload @relation(fields: [fileUploadId], references: [id]) + schemaId String? + credDefId String? + status Boolean @default(false) + credential_data Json? }