added migrations folder to git-project to sync resolved migrations

This commit is contained in:
PxlLoewe
2025-06-27 18:44:18 -07:00
parent e3988c24e3
commit 8071f4b764
57 changed files with 1012 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
/*
Warnings:
- You are about to drop the column `reportedId` on the `Report` table. All the data in the column will be lost.
- You are about to drop the column `senderId` on the `Report` table. All the data in the column will be lost.
- Added the required column `reportedUserId` to the `Report` table without a default value. This is not possible if the table is not empty.
- Added the required column `senderUserId` to the `Report` table without a default value. This is not possible if the table is not empty.
*/
-- DropForeignKey
ALTER TABLE "Report" DROP CONSTRAINT "Report_reportedId_fkey";
-- DropForeignKey
ALTER TABLE "Report" DROP CONSTRAINT "Report_senderId_fkey";
-- AlterTable
ALTER TABLE "Report" DROP COLUMN "reportedId",
DROP COLUMN "senderId",
ADD COLUMN "reportedUserId" TEXT NOT NULL,
ADD COLUMN "reviewerUserId" TEXT,
ADD COLUMN "senderUserId" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "Report" ADD CONSTRAINT "Report_senderUserId_fkey" FOREIGN KEY ("senderUserId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Report" ADD CONSTRAINT "Report_reportedUserId_fkey" FOREIGN KEY ("reportedUserId") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
-- AddForeignKey
ALTER TABLE "Report" ADD CONSTRAINT "Report_reviewerUserId_fkey" FOREIGN KEY ("reviewerUserId") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;