mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
when an issue is deleted, TimedSession's issueId is set to null
This commit is contained in:
@@ -84,9 +84,7 @@ export const TimedSession = pgTable("TimedSession", {
|
||||
userId: integer()
|
||||
.notNull()
|
||||
.references(() => User.id),
|
||||
issueId: integer()
|
||||
.notNull()
|
||||
.references(() => Issue.id),
|
||||
issueId: integer().references(() => Issue.id, { onDelete: "set null" }),
|
||||
timestamps: timestamp({ withTimezone: false }).array().notNull(),
|
||||
endedAt: timestamp({ withTimezone: false }),
|
||||
createdAt: timestamp({ withTimezone: false }).defaultNow(),
|
||||
|
||||
Reference in New Issue
Block a user