Keep issues when assignee or reporter is deleted
Switch issue.assigneeId/reporterId FKs from CASCADE to SET NULL and make reporter nullable through the entity, DTOs and GraphQL types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4b8c855855
commit
2696f33a7e
8 files changed
+31
-21
No files matched your search
@@ -12,7 +12,8 @@ interface IssueProps {
|
||||
status: IssueStatus;
|
||||
priority: IssuePriority;
|
||||
assignee: string | null;
|
||||
reporter: string;
|
||||
/** null — автор задачи удалил аккаунт */
|
||||
reporter: string | null;
|
||||
projectId: string;
|
||||
dueDate: Date | null;
|
||||
createdAt: Date;
|
||||
@@ -72,7 +73,7 @@ export class Issue {
|
||||
status: string;
|
||||
priority: number;
|
||||
assignee: string | null;
|
||||
reporter: string;
|
||||
reporter: string | null;
|
||||
projectId: string;
|
||||
dueDate: Date | null;
|
||||
createdAt: Date;
|
||||
@@ -122,7 +123,7 @@ export class Issue {
|
||||
return this.props.assignee;
|
||||
}
|
||||
|
||||
get reporter(): string {
|
||||
get reporter(): string | null {
|
||||
return this.props.reporter;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user