Skip to content

Commit 721efa8

Browse files
committed
Apply the schema change for recipe ingredients being completely determined by their recipe and order.
1 parent 5f246de commit 721efa8

File tree

1 file changed

+16
-0
lines changed
  • webserver/prisma/migrations/20231127035122_remove_recipe_ingredient_id

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
Warnings:
3+
4+
- The primary key for the `RecipeIngredient` table will be changed. If it partially fails, the table could be left without primary key constraint.
5+
- You are about to drop the column `id` on the `RecipeIngredient` table. All the data in the column will be lost.
6+
- Made the column `order` on table `RecipeIngredient` required. This step will fail if there are existing NULL values in that column.
7+
8+
*/
9+
-- DropIndex
10+
DROP INDEX "RecipeIngredient_recipeId_order_key";
11+
12+
-- AlterTable
13+
ALTER TABLE "RecipeIngredient" DROP CONSTRAINT "RecipeIngredient_pkey",
14+
DROP COLUMN "id",
15+
ALTER COLUMN "order" SET NOT NULL,
16+
ADD CONSTRAINT "RecipeIngredient_pkey" PRIMARY KEY ("recipeId", "order");

0 commit comments

Comments
 (0)