backend/prisma/migrations/20241201160930_test/migration.sql
2024-12-01 22:19:33 +03:30

11 lines
400 B
SQL

/*
Warnings:
- Added the required column `userId` to the `ImagePost` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "ImagePost" ADD COLUMN "userId" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "ImagePost" ADD CONSTRAINT "ImagePost_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;