The ID is not necessarily unique, so we have to add more attributes to
the primary key of the VIEW.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
return self.list.slug
# Name
- name: str
+ name: str = sqlmodel.Field(primary_key=True)
# Source ID
source_id: int | None = sqlmodel.Field(foreign_key="sources.id", exclude=True)
return self.source.name
# Timestamp
- timestamp: datetime.datetime
+ timestamp: datetime.datetime = sqlmodel.Field(primary_key=True)
# Type
- type: str
+ type: str = sqlmodel.Field(primary_key=True)
# Block?
block: bool