project-knedita/prisma/migrations/20241012141115_updated_model_comments/migration.sql

7 lines
279 B
MySQL
Raw Permalink Normal View History

-- AlterTable
ALTER TABLE "Comments" ADD COLUMN "parentId" TEXT,
ALTER COLUMN "kweekId" DROP NOT NULL;
-- AddForeignKey
ALTER TABLE "Comments" ADD CONSTRAINT "Comments_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Comments"("id") ON DELETE SET NULL ON UPDATE CASCADE;