Skip to content

feat(prisma): link alerts to incidents - #225

Merged
mijinummi merged 1 commit into
MD-Creative-Production:mainfrom
lishmanTech:newcon
Aug 24, 2026
Merged

feat(prisma): link alerts to incidents#225
mijinummi merged 1 commit into
MD-Creative-Production:mainfrom
lishmanTech:newcon

Conversation

@lishmanTech

Copy link
Copy Markdown
Contributor

Summary

  • Add an optional relationship between Alert and Incident.
  • Add an index on alerts.incidentId for efficient incident-based alert lookups.
  • Add the corresponding foreign key constraint with ON DELETE SET NULL.
  • Generate the Prisma migration for the new relationship.

Implementation

Alerts can now optionally belong to an incident, allowing multiple related alerts to be grouped under a single security incident.

The relationship is nullable so existing alerts can remain unassigned to an incident.

Validation

  • npx prisma format
  • npx prisma validate
  • Prisma migration generated successfully.

Closes #118

@mijinummi
mijinummi merged commit 2883397 into MD-Creative-Production:main Aug 24, 2026
6 of 12 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Aug 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Incident Entity

2 participants