-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(EnrollmentCompletedItem, Table): Rename table
- Loading branch information
1 parent
aeb9788
commit a1eb80e
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
prisma/migrations/20240224074949_rename_table_for_enrollment_completed_items/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters