Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Notification model and database table for user notifications, with support for notification types, optional target URLs, and dismissal tracking.
Changes:
- New
NotificationTypeenum with two values for artefact and environment review assignments - New
NotificationSQLAlchemy model with user foreign key, notification type, target URL, and dismissed timestamp - Alembic migration to create the
notificationtable with an index onuser_id - Pydantic response models for the notifications API
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
backend/test_observer/data_access/models_enums.py |
Adds NotificationType enum |
backend/test_observer/data_access/models.py |
Adds Notification model |
backend/test_observer/controllers/notifications/models.py |
Adds Pydantic response schemas |
backend/migrations/versions/2026_03_10_1618-983168a63271_add_notifications.py |
Alembic migration for notification table |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
backend/migrations/versions/2026_03_10_1618-983168a63271_add_notifications.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Adds a Notification model and corresponding database migration for a user notification system, along with Pydantic response models for the API layer.
Changes:
- New
NotificationSQLAlchemy model with user foreign key, notification type enum, optional target URL, and dismissed timestamp - New
NotificationTypeenum with two values for artefact and environment review assignments - Alembic migration to create the
notificationtable
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
backend/test_observer/data_access/models_enums.py |
Adds NotificationType enum |
backend/test_observer/data_access/models.py |
Adds Notification model |
backend/test_observer/controllers/notifications/models.py |
Adds Pydantic response models for notifications |
backend/migrations/versions/2026_03_10_1618-983168a63271_add_notifications.py |
Alembic migration to create the notification table |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Description
This PR is the first in TO-291. It creates a notifications table and model.
A notification has:
dismissed_attimestamp representing when the notification was marked as read by the user (null if it wasn't)Resolved issues
Part of TO-291
Web service API changes
Added a migration