diff --git a/.gitignore b/.gitignore index e338717..9c2fe90 100644 --- a/.gitignore +++ b/.gitignore @@ -379,4 +379,6 @@ $RECYCLE.BIN/ # and uncomment the following lines # .pnp.* -# End of https://www.toptal.com/developers/gitignore/api/linux,windows,macos,node,visualstudiocode,intellij+all,nextjs,yarn \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/linux,windows,macos,node,visualstudiocode,intellij+all,nextjs,yarn + +mangas/ \ No newline at end of file diff --git a/prisma/migrations/20221006210146_init/migration.sql b/prisma/migrations/20221014002316_init/migration.sql similarity index 77% rename from prisma/migrations/20221006210146_init/migration.sql rename to prisma/migrations/20221014002316_init/migration.sql index 95a4644..545de16 100644 --- a/prisma/migrations/20221006210146_init/migration.sql +++ b/prisma/migrations/20221014002316_init/migration.sql @@ -11,7 +11,6 @@ CREATE TABLE "Manga" ( "cover" TEXT NOT NULL, "interval" TEXT NOT NULL, "source" TEXT NOT NULL, - "query" TEXT NOT NULL, - "libraryId" INTEGER, - CONSTRAINT "Manga_libraryId_fkey" FOREIGN KEY ("libraryId") REFERENCES "Library" ("id") ON DELETE SET NULL ON UPDATE CASCADE + "libraryId" INTEGER NOT NULL, + CONSTRAINT "Manga_libraryId_fkey" FOREIGN KEY ("libraryId") REFERENCES "Library" ("id") ON DELETE RESTRICT ON UPDATE CASCADE ); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index bbbfcc8..7b04c78 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -23,7 +23,6 @@ model Manga { cover String interval String source String - query String - Library Library? @relation(fields: [libraryId], references: [id]) - libraryId Int? + Library Library @relation(fields: [libraryId], references: [id]) + libraryId Int } diff --git a/src/components/addLibrary.tsx b/src/components/addLibrary.tsx index b685a13..45ce012 100644 --- a/src/components/addLibrary.tsx +++ b/src/components/addLibrary.tsx @@ -29,8 +29,9 @@ function Form({ onClose }: { onClose: () => void }) {