From 9914991f3af3dcea2dabe9a2fe357744974f0b98 Mon Sep 17 00:00:00 2001 From: amjed-ali-k Date: Wed, 25 Oct 2023 01:31:51 +0530 Subject: [PATCH] updated db --- migrations/20231024195850_cl_4/migration.sql | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 migrations/20231024195850_cl_4/migration.sql diff --git a/migrations/20231024195850_cl_4/migration.sql b/migrations/20231024195850_cl_4/migration.sql new file mode 100644 index 0000000..688e683 --- /dev/null +++ b/migrations/20231024195850_cl_4/migration.sql @@ -0,0 +1,28 @@ +/* + Warnings: + + - You are about to drop the `ExamResult` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Mark` table. If the table is not empty, all the data it contains will be lost. + +*/ +-- DropTable +DROP TABLE "ExamResult"; + +-- DropTable +DROP TABLE "Mark"; + +-- CreateTable +CREATE TABLE "StudentBatchForExam" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "students" JSONB NOT NULL, + "studentsCount" INTEGER NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "createdById" TEXT NOT NULL, + + CONSTRAINT "StudentBatchForExam_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE INDEX "StudentBatchForExam_createdById_idx" ON "StudentBatchForExam"("createdById");