Ensure the notifications column set in init_db like messages and push_registration

notifications was filtered and indexed on user_uid and read without an
ensure-block, so a partial first insert could create it with a reduced
schema. The block mirrors the messages one and the table joins
FILTERED_COLUMNS. idx_notifications_user_read already serves the unread
count the push payload now reads.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 04:05:08 +01:00
co-authored by Claude Sonnet 5.5
parent d815fbe9f8
commit 2452f9e85b
3 changed files with 15 additions and 1 deletions
+1
View File
@@ -4,6 +4,7 @@ from devplacepy.database import get_table, init_db
FILTERED_COLUMNS = {
"messages": ("uid", "sender_uid", "receiver_uid", "content", "read", "created_at", "updated_at"),
"notifications": ("uid", "user_uid", "type", "message", "related_uid", "target_url", "read", "created_at"),
"workspace_quota_rules": ("uid", "owner_kind", "owner_id", "deleted_at"),
"workspace_editor_prefs": ("uid", "owner_kind", "owner_id", "deleted_at"),
}