Skip to content

Commit

Permalink
Fix(EnrollmentCompletedItem, Table): Rename table
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur-Poffo committed Feb 24, 2024
1 parent aeb9788 commit a1eb80e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Warnings:
- You are about to drop the `EnrollmentCompletedItem` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "EnrollmentCompletedItem" DROP CONSTRAINT "EnrollmentCompletedItem_enrollment_id_fkey";

-- DropTable
DROP TABLE "EnrollmentCompletedItem";

-- CreateTable
CREATE TABLE "enrollment_completed_items" (
"id" TEXT NOT NULL,
"item_type" "EnrollmentCompletedItemTypes" NOT NULL,
"item_id" TEXT NOT NULL,
"enrollment_id" TEXT NOT NULL,

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

-- AddForeignKey
ALTER TABLE "enrollment_completed_items" ADD CONSTRAINT "enrollment_completed_items_enrollment_id_fkey" FOREIGN KEY ("enrollment_id") REFERENCES "enrollments"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
2 changes: 2 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ model EnrollmentCompletedItem {
itemId String @map("item_id")
enrollmentId String @map("enrollment_id")
@@map("enrollment_completed_items")
}

model Evaluation {
Expand Down

0 comments on commit a1eb80e

Please sign in to comment.