/* Warnings: - The primary key for the `Reaction` table will be changed. If it partially fails, the table could be left without primary key constraint. - You are about to drop the column `id` on the `Reaction` table. All the data in the column will be lost. - A unique constraint covering the columns `[content]` on the table `Reaction` will be added. If there are existing duplicate values, this will fail. */ -- DropForeignKey ALTER TABLE "_ReactionToUser" DROP CONSTRAINT "_ReactionToUser_A_fkey"; -- DropIndex DROP INDEX "Reaction_id_key"; -- AlterTable ALTER TABLE "Reaction" DROP CONSTRAINT "Reaction_pkey", DROP COLUMN "id", ADD CONSTRAINT "Reaction_pkey" PRIMARY KEY ("content"); -- CreateIndex CREATE UNIQUE INDEX "Reaction_content_key" ON "Reaction"("content"); -- AddForeignKey ALTER TABLE "_ReactionToUser" ADD CONSTRAINT "_ReactionToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "Reaction"("content") ON DELETE CASCADE ON UPDATE CASCADE;