mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-11-23 19:29:17 +03:00
Upgrade Prisma to version 3.9.1 (#452)
This commit is contained in:
parent
830bb43be1
commit
09a72a7e1a
@ -0,0 +1,26 @@
|
|||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Article" DROP CONSTRAINT "Article_userId_fkey";
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Comment" DROP CONSTRAINT "Comment_articleId_fkey";
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Comment" DROP CONSTRAINT "Comment_userId_fkey";
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Article" ADD CONSTRAINT "Article_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Comment" ADD CONSTRAINT "Comment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Comment" ADD CONSTRAINT "Comment_articleId_fkey" FOREIGN KEY ("articleId") REFERENCES "Article"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- RenameIndex
|
||||||
|
ALTER INDEX "Article.slug_unique" RENAME TO "Article_slug_key";
|
||||||
|
|
||||||
|
-- RenameIndex
|
||||||
|
ALTER INDEX "User.email_unique" RENAME TO "User_email_key";
|
||||||
|
|
||||||
|
-- RenameIndex
|
||||||
|
ALTER INDEX "User.username_unique" RENAME TO "User_username_key";
|
@ -0,0 +1,20 @@
|
|||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Card" DROP CONSTRAINT "Card_authorId_fkey";
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "Card" DROP CONSTRAINT "Card_listId_fkey";
|
||||||
|
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE "List" DROP CONSTRAINT "List_userId_fkey";
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "List" ADD CONSTRAINT "List_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Card" ADD CONSTRAINT "Card_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Card" ADD CONSTRAINT "Card_listId_fkey" FOREIGN KEY ("listId") REFERENCES "List"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- RenameIndex
|
||||||
|
ALTER INDEX "User.email_unique" RENAME TO "User_email_key";
|
@ -0,0 +1,18 @@
|
|||||||
|
-- RedefineTables
|
||||||
|
PRAGMA foreign_keys=OFF;
|
||||||
|
CREATE TABLE "new_Task" (
|
||||||
|
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
|
"description" TEXT NOT NULL,
|
||||||
|
"isDone" BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
"userId" INTEGER NOT NULL,
|
||||||
|
CONSTRAINT "Task_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
INSERT INTO "new_Task" ("description", "id", "isDone", "userId") SELECT "description", "id", "isDone", "userId" FROM "Task";
|
||||||
|
DROP TABLE "Task";
|
||||||
|
ALTER TABLE "new_Task" RENAME TO "Task";
|
||||||
|
PRAGMA foreign_key_check;
|
||||||
|
PRAGMA foreign_keys=ON;
|
||||||
|
|
||||||
|
-- RedefineIndex
|
||||||
|
DROP INDEX "User.email_unique";
|
||||||
|
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
|
@ -22,4 +22,4 @@ nodeVersionAsText = printf "%d.%d.%d" major minor patch
|
|||||||
(major, minor, patch) = nodeVersion
|
(major, minor, patch) = nodeVersion
|
||||||
|
|
||||||
prismaVersion :: String
|
prismaVersion :: String
|
||||||
prismaVersion = "2.22.1"
|
prismaVersion = "3.9.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user