mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Adapt notification model mapped types
Unfortunately I thought the default for columns was "non-nullable" so these columns are nullable in the database, but they will never be in the app. This change matches the type expected in the app with the real nullable state in the database.
This commit is contained in:
@@ -2937,12 +2937,14 @@ class Notification(Base, Dictifiable, RepresentById):
|
||||
expiration_time: Mapped[Optional[datetime]] = mapped_column(
|
||||
default=now() + timedelta(days=30 * 6)
|
||||
) # The expiration date, expired notifications will be permanently removed from DB regularly
|
||||
source: Mapped[Optional[str]] = mapped_column(String(32), index=True) # Who (or what) generated the notification
|
||||
category: Mapped[Optional[str]] = mapped_column(
|
||||
String(64), index=True
|
||||
source: Mapped[str] = mapped_column(
|
||||
String(32), index=True, nullable=True
|
||||
) # Who (or what) generated the notification
|
||||
category: Mapped[str] = mapped_column(
|
||||
String(64), index=True, nullable=True
|
||||
) # Category of the notification, defines its contents. Used for filtering, un/subscribing, etc
|
||||
variant: Mapped[Optional[str]] = mapped_column(
|
||||
String(16), index=True
|
||||
variant: Mapped[str] = mapped_column(
|
||||
String(16), index=True, nullable=True
|
||||
) # Defines the 'importance' of the notification ('info', 'warning', 'urgent', etc.). Used for filtering, highlight rendering, etc
|
||||
dispatched: Mapped[Boolean] = mapped_column(
|
||||
Boolean, index=True, nullable=False, default=False
|
||||
|
||||
Reference in New Issue
Block a user