/* Warnings: - You are about to drop the column `comments` on the `Article` table. All the data in the column will be lost. */ -- AlterTable ALTER TABLE "Article" DROP COLUMN "comments"; -- CreateTable CREATE TABLE "Comment" ( "id" TEXT NOT NULL, "content" TEXT NOT NULL, "likes" INTEGER NOT NULL DEFAULT 0, "dislikes" INTEGER NOT NULL DEFAULT 0, "articleId" TEXT NOT NULL, "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updatedAt" TIMESTAMP(3) NOT NULL, CONSTRAINT "Comment_pkey" PRIMARY KEY ("id") ); -- AddForeignKey ALTER TABLE "Comment" ADD CONSTRAINT "Comment_articleId_fkey" FOREIGN KEY ("articleId") REFERENCES "Article"("id") ON DELETE RESTRICT ON UPDATE CASCADE;