text: -- AlterTable
  ALTER TABLE "Permissions" ADD COLUMN     "post" BOOLEAN NOT NULL DEFAULT false;
  
  -- AlterTable
  ALTER TABLE "Post" ADD COLUMN     "likes" INTEGER NOT NULL DEFAULT 0;
  
  -- CreateTable
  CREATE TABLE "Comment" (
      "id" SERIAL NOT NULL,
      "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
      "updatedAt" TIMESTAMP(3) NOT NULL,
      "content" TEXT NOT NULL,
      "edited" BOOLEAN NOT NULL DEFAULT false,
      "likes" INTEGER NOT NULL DEFAULT 0,
      "parentId" INTEGER,
      "postId" INTEGER NOT NULL,
      "authorId" INTEGER NOT NULL,
  
      CONSTRAINT "Comment_pkey" PRIMARY KEY ("id")
  );
  
  -- CreateTable
  CREATE TABLE "Tag" (
      "name" TEXT NOT NULL,
      "color" TEXT NOT NULL,
  
      CONSTRAINT "Tag_pkey" PRIMARY KEY ("name")
  );
  
  -- CreateTable
  CREATE TABLE "_PostToTag" (
      "A" INTEGER NOT NULL,
      "B" TEXT NOT NULL
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "Tag_name_key" ON "Tag"("name");
  
  -- CreateIndex
  CREATE UNIQUE INDEX "_PostToTag_AB_unique" ON "_PostToTag"("A", "B");
  
  -- CreateIndex
  CREATE INDEX "_PostToTag_B_index" ON "_PostToTag"("B");
  
  -- AddForeignKey
  ALTER TABLE "Comment" ADD CONSTRAINT "Comment_postId_fkey" FOREIGN KEY ("postId") REFERENCES "Post"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Comment" ADD CONSTRAINT "Comment_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "Comment"("id") ON DELETE SET NULL ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "Comment" ADD CONSTRAINT "Comment_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "_PostToTag" ADD FOREIGN KEY ("A") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "_PostToTag" ADD FOREIGN KEY ("B") REFERENCES "Tag"("name") ON DELETE CASCADE ON UPDATE CASCADE;
  