24 lines
1.1 KiB
SQL
24 lines
1.1 KiB
SQL
/*
|
|
Warnings:
|
|
|
|
- The primary key for the `Reaction` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
|
- A unique constraint covering the columns `[id]` on the table `Reaction` will be added. If there are existing duplicate values, this will fail.
|
|
- The required column `id` was added to the `Reaction` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
|
|
|
|
*/
|
|
-- DropForeignKey
|
|
ALTER TABLE "_ReactionToUser" DROP CONSTRAINT "_ReactionToUser_A_fkey";
|
|
|
|
-- DropIndex
|
|
DROP INDEX "Reaction_content_key";
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "Reaction" DROP CONSTRAINT "Reaction_pkey",
|
|
ADD COLUMN "id" TEXT NOT NULL,
|
|
ADD CONSTRAINT "Reaction_pkey" PRIMARY KEY ("id");
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "Reaction_id_key" ON "Reaction"("id");
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "_ReactionToUser" ADD CONSTRAINT "_ReactionToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "Reaction"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|