Set thread_id column to non-null for event_push_{actions,actions_staging,summary} (#15437)
Updates the database schema to require a thread_id (by adding a constraint that the column is non-null) for event_push_actions, event_push_actions_staging, and event_push_actions_summary. For PostgreSQL we add the constraint as NOT VALID, then VALIDATE the constraint a background job to avoid locking the table during an upgrade. For SQLite we simply rebuild the table & copy the data.
Showing
- changelog.d/15437.misc 1 addition, 0 deletionschangelog.d/15437.misc
- synapse/storage/background_updates.py 44 additions, 0 deletionssynapse/storage/background_updates.py
- synapse/storage/databases/main/event_push_actions.py 10 additions, 234 deletionssynapse/storage/databases/main/event_push_actions.py
- synapse/storage/schema/__init__.py 3 additions, 0 deletionssynapse/storage/schema/__init__.py
- synapse/storage/schema/main/delta/76/04thread_notifications_backfill.sql 28 additions, 0 deletions.../schema/main/delta/76/04thread_notifications_backfill.sql
- synapse/storage/schema/main/delta/76/05thread_notifications_not_null.sql.postgres 37 additions, 0 deletions...ain/delta/76/05thread_notifications_not_null.sql.postgres
- synapse/storage/schema/main/delta/76/05thread_notifications_not_null.sql.sqlite 102 additions, 0 deletions.../main/delta/76/05thread_notifications_not_null.sql.sqlite
Loading