Skip to content

Commit

Permalink
feat: make institution/author optional for actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nojhamster committed Oct 20, 2023
1 parent 8826b91 commit ed4702b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ model Action {
/// ID of the action
id String @id @default(cuid())
// ID of the institution concerned by the action
institutionId String
institutionId String?
// The institution concerned by the action
institution Institution @relation(fields: [institutionId], references: [id], onDelete: Cascade)
institution Institution? @relation(fields: [institutionId], references: [id], onDelete: Cascade)
/// ID of the user that triggered the action
authorId String
authorId String?
/// The user that triggered the action
author User @relation(fields: [authorId], references: [username])
author User? @relation(fields: [authorId], references: [username])
/// When the action occurred
date DateTime @default(now())
/// The action type (ex: commentInstitution, createSpace)
Expand Down

0 comments on commit ed4702b

Please sign in to comment.