anderson-ufrj
commited on
Commit
·
33bb433
1
Parent(s):
3c026fb
fix: rename metadata field to avoid SQLAlchemy reserved word
Browse files- Change 'metadata' to 'notification_metadata' in NotificationHistoryDB
- Use Column('metadata') to keep database column name unchanged
- Fixes SQLAlchemy InvalidRequestError on startup
src/models/notification_models.py
CHANGED
|
@@ -156,8 +156,8 @@ class NotificationHistoryDB(Base):
|
|
| 156 |
channels_delivered = Column(JSON, default=[])
|
| 157 |
delivery_status = Column(JSON, default={}) # Channel -> status mapping
|
| 158 |
|
| 159 |
-
# Metadata
|
| 160 |
-
|
| 161 |
created_at = Column(DateTime, default=lambda: datetime.now(timezone.utc))
|
| 162 |
read_at = Column(DateTime, nullable=True)
|
| 163 |
|
|
|
|
| 156 |
channels_delivered = Column(JSON, default=[])
|
| 157 |
delivery_status = Column(JSON, default={}) # Channel -> status mapping
|
| 158 |
|
| 159 |
+
# Metadata (renamed to avoid SQLAlchemy reserved word)
|
| 160 |
+
notification_metadata = Column('metadata', JSON, default={})
|
| 161 |
created_at = Column(DateTime, default=lambda: datetime.now(timezone.utc))
|
| 162 |
read_at = Column(DateTime, nullable=True)
|
| 163 |
|