Skip to content

Commit

Permalink
Merge pull request #1 from solaoi/dependencies-1631891380
Browse files Browse the repository at this point in the history
Automated Dependency Updates
  • Loading branch information
solaoi authored Sep 19, 2021
2 parents 18c6e93 + 81c77a9 commit eabfc06
Show file tree
Hide file tree
Showing 8 changed files with 1,124 additions and 1,168 deletions.
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
save-exact=true
legacy-peer-deps=true
engine-strict=true
1 change: 0 additions & 1 deletion app/projects/mutations/deleteProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const DeleteProject = z.object({
})

export default resolver.pipe(resolver.zod(DeleteProject), resolver.authorize(), async ({ id }) => {
await db.stub.deleteMany({ where: { projectId: id } })
// TODO: in multi-tenant app, you must add validation to ensure correct tenant
const project = await db.project.deleteMany({ where: { id } })

Expand Down
Empty file removed db/migrations/.keep
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CREATE TABLE "Session" (
"publicData" TEXT,
"privateData" TEXT,
"userId" INTEGER,
FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE SET NULL ON UPDATE CASCADE
CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE SET NULL ON UPDATE CASCADE
);

-- CreateTable
Expand All @@ -34,7 +34,7 @@ CREATE TABLE "Token" (
"expiresAt" DATETIME NOT NULL,
"sentTo" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
CONSTRAINT "Token_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
);

-- CreateTable
Expand All @@ -61,20 +61,20 @@ CREATE TABLE "Stub" (
"statusCode" TEXT NOT NULL,
"response" TEXT NOT NULL,
"projectId" INTEGER NOT NULL,
FOREIGN KEY ("projectId") REFERENCES "Project" ("id") ON DELETE CASCADE ON UPDATE CASCADE
CONSTRAINT "Stub_projectId_fkey" FOREIGN KEY ("projectId") REFERENCES "Project" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);

-- CreateIndex
CREATE UNIQUE INDEX "User.email_unique" ON "User"("email");
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

-- CreateIndex
CREATE UNIQUE INDEX "Session.handle_unique" ON "Session"("handle");
CREATE UNIQUE INDEX "Session_handle_key" ON "Session"("handle");

-- CreateIndex
CREATE UNIQUE INDEX "Token.hashedToken_type_unique" ON "Token"("hashedToken", "type");
CREATE UNIQUE INDEX "Token_hashedToken_type_key" ON "Token"("hashedToken", "type");

-- CreateIndex
CREATE UNIQUE INDEX "Project.name_unique" ON "Project"("name");
CREATE UNIQUE INDEX "Project_name_key" ON "Project"("name");

-- CreateIndex
CREATE UNIQUE INDEX "Project.basePath_unique" ON "Project"("basePath");
CREATE UNIQUE INDEX "Project_basePath_key" ON "Project"("basePath");
2 changes: 1 addition & 1 deletion db/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ model Stub {
contentType String
statusCode String
response String
project Project @relation(fields: [projectId], references: [id])
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
projectId Int
}
Loading

0 comments on commit eabfc06

Please sign in to comment.