text: /*
    Warnings:
  
    - You are about to drop the `CategoriesOnPosts` table. If the table is not empty, all the data it contains will be lost.
  
  */
  -- DropForeignKey
  ALTER TABLE "CategoriesOnPosts" DROP CONSTRAINT "CategoriesOnPosts_categoryId_fkey";
  
  -- DropForeignKey
  ALTER TABLE "CategoriesOnPosts" DROP CONSTRAINT "CategoriesOnPosts_postId_fkey";
  
  -- DropTable
  DROP TABLE "CategoriesOnPosts";
  
  -- CreateTable
  CREATE TABLE "_CategoryToPost" (
      "A" TEXT NOT NULL,
      "B" TEXT NOT NULL
  );
  
  -- CreateIndex
  CREATE UNIQUE INDEX "_CategoryToPost_AB_unique" ON "_CategoryToPost"("A", "B");
  
  -- CreateIndex
  CREATE INDEX "_CategoryToPost_B_index" ON "_CategoryToPost"("B");
  
  -- AddForeignKey
  ALTER TABLE "_CategoryToPost" ADD FOREIGN KEY ("A") REFERENCES "Category"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  
  -- AddForeignKey
  ALTER TABLE "_CategoryToPost" ADD FOREIGN KEY ("B") REFERENCES "Post"("id") ON DELETE CASCADE ON UPDATE CASCADE;
  