-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from code4livinglab/feat/terms-and-policy
Feat/terms and policy
- Loading branch information
Showing
7 changed files
with
135 additions
and
3 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
prisma/migrations/20241212180202_v0_2_0_notification/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,25 @@ | ||
-- CreateTable | ||
CREATE TABLE "Notification" ( | ||
"id" TEXT NOT NULL, | ||
"message" TEXT NOT NULL, | ||
"url" TEXT, | ||
"created" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"updated" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
||
CONSTRAINT "Notification_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "NotificationUser" ( | ||
"userId" TEXT NOT NULL, | ||
"notificationId" TEXT NOT NULL, | ||
"isRead" BOOLEAN NOT NULL DEFAULT false, | ||
|
||
CONSTRAINT "NotificationUser_pkey" PRIMARY KEY ("notificationId","userId") | ||
); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "NotificationUser" ADD CONSTRAINT "NotificationUser_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "NotificationUser" ADD CONSTRAINT "NotificationUser_notificationId_fkey" FOREIGN KEY ("notificationId") REFERENCES "Notification"("id") ON DELETE RESTRICT ON UPDATE CASCADE; |
3 changes: 3 additions & 0 deletions
3
prisma/migrations/20241212180639_v0_2_1_update_project_user/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,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "ProjectUser" ADD COLUMN "created" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN "updated" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; |
26 changes: 26 additions & 0 deletions
26
prisma/migrations/20241212185436_v0_2_2_update_notification_id/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,26 @@ | ||
/* | ||
Warnings: | ||
- The primary key for the `Notification` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- The `id` column on the `Notification` table would be dropped and recreated. This will lead to data loss if there is data in the column. | ||
- The primary key for the `NotificationUser` table will be changed. If it partially fails, the table could be left without primary key constraint. | ||
- Changed the type of `notificationId` on the `NotificationUser` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required. | ||
*/ | ||
-- DropForeignKey | ||
ALTER TABLE "NotificationUser" DROP CONSTRAINT "NotificationUser_notificationId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Notification" DROP CONSTRAINT "Notification_pkey", | ||
DROP COLUMN "id", | ||
ADD COLUMN "id" SERIAL NOT NULL, | ||
ADD CONSTRAINT "Notification_pkey" PRIMARY KEY ("id"); | ||
|
||
-- AlterTable | ||
ALTER TABLE "NotificationUser" DROP CONSTRAINT "NotificationUser_pkey", | ||
DROP COLUMN "notificationId", | ||
ADD COLUMN "notificationId" INTEGER NOT NULL, | ||
ADD CONSTRAINT "NotificationUser_pkey" PRIMARY KEY ("userId", "notificationId"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "NotificationUser" ADD CONSTRAINT "NotificationUser_notificationId_fkey" FOREIGN KEY ("notificationId") REFERENCES "Notification"("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