mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 15:56:45 -04:00
Compare commits
1 Commits
frequent-t
...
sync-migra
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ab0ab70ff |
@@ -1472,7 +1472,7 @@ class Notification(db.Model):
|
|||||||
['templates_history.id', 'templates_history.version'],
|
['templates_history.id', 'templates_history.version'],
|
||||||
),
|
),
|
||||||
UniqueConstraint('job_id', 'job_row_number', name='uq_notifications_job_row_number'),
|
UniqueConstraint('job_id', 'job_row_number', name='uq_notifications_job_row_number'),
|
||||||
{}
|
Index('ix_notifications_service_created_at', 'service_id', 'created_at')
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -1727,7 +1727,10 @@ class NotificationHistory(db.Model, HistoryModel):
|
|||||||
['template_id', 'template_version'],
|
['template_id', 'template_version'],
|
||||||
['templates_history.id', 'templates_history.version'],
|
['templates_history.id', 'templates_history.version'],
|
||||||
),
|
),
|
||||||
{}
|
Index(
|
||||||
|
'ix_notification_history_service_id_composite',
|
||||||
|
'service_id', 'key_type', 'notification_type', 'created_at',
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -1742,20 +1745,12 @@ class NotificationHistory(db.Model, HistoryModel):
|
|||||||
|
|
||||||
|
|
||||||
# Indexes for notification_history and notifications to improve performance of fetch queries.
|
# Indexes for notification_history and notifications to improve performance of fetch queries.
|
||||||
Index(
|
|
||||||
'ix_notification_history_service_id_composite',
|
|
||||||
NotificationHistory.service_id,
|
|
||||||
NotificationHistory.key_type,
|
|
||||||
NotificationHistory.notification_type,
|
|
||||||
NotificationHistory.created_at
|
|
||||||
)
|
|
||||||
Index(
|
Index(
|
||||||
'ix_notifications_notification_type_composite',
|
'ix_notifications_notification_type_composite',
|
||||||
Notification.notification_type,
|
Notification.notification_type,
|
||||||
Notification.status,
|
Notification.status,
|
||||||
Notification.created_at
|
Notification.created_at
|
||||||
)
|
)
|
||||||
Index('ix_notifications_service_created_at', Notification.service_id, Notification.created_at)
|
|
||||||
Index(
|
Index(
|
||||||
"ix_notifications_service_id_composite",
|
"ix_notifications_service_id_composite",
|
||||||
Notification.service_id,
|
Notification.service_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user