Skip to content

Commit

Permalink
LastAlert.tenant_id should be primary key not only in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirFilonov committed Nov 24, 2024
1 parent bfa1d31 commit 7c50d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keep/api/models/db/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class AlertToIncident(SQLModel, table=True):

class LastAlert(SQLModel, table=True):

tenant_id: str = Field(foreign_key="tenant.id", nullable=False)
tenant_id: str = Field(foreign_key="tenant.id", nullable=False, primary_key=True)
fingerprint: str = Field(primary_key=True)
alert_id: UUID = Field(foreign_key="alert.id")
timestamp: datetime = Field(nullable=False, index=True)
Expand Down

0 comments on commit 7c50d25

Please sign in to comment.