-
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.
#103 Add new quiz columns to track latest updated and deletions
- Loading branch information
1 parent
bbfcccc
commit d60f193
Showing
4 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
prisma/migrations/20240813170920_track_quiz_changes/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,12 @@ | ||
-- AlterTable | ||
ALTER TABLE "quiz" ADD COLUMN "deleted_at" TIMESTAMP(3), | ||
ADD COLUMN "deleted_by_user_id" TEXT, | ||
ADD COLUMN "deletion_reason" TEXT, | ||
ADD COLUMN "updated_at" TIMESTAMP(3), | ||
ADD COLUMN "updated_by_user_id" TEXT; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "quiz" ADD CONSTRAINT "quiz_deleted_by_user_id_fkey" FOREIGN KEY ("deleted_by_user_id") REFERENCES "user"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "quiz" ADD CONSTRAINT "quiz_updated_by_user_id_fkey" FOREIGN KEY ("updated_by_user_id") REFERENCES "user"("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
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
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