prisma (#1)
migrate from knex to prisma on backend Co-authored-by: fred <> Reviewed-on: #1
This commit is contained in:
parent
24281a6322
commit
0a41568a2e
31 changed files with 1577 additions and 472 deletions
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `ingredients` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "public"."recipe_ingredients" ADD COLUMN "recipesId" INTEGER;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "public"."recipe_steps" ADD COLUMN "recipesId" INTEGER;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "public"."ingredients";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "public"."recipe_ingredients" ADD CONSTRAINT "recipe_ingredients_recipesId_fkey" FOREIGN KEY ("recipesId") REFERENCES "public"."recipes"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "public"."recipe_steps" ADD CONSTRAINT "recipe_steps_recipesId_fkey" FOREIGN KEY ("recipesId") REFERENCES "public"."recipes"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
Loading…
Add table
Add a link
Reference in a new issue