Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Set thread_id column to non-null for event_push_{actions,actions_staging,summary} #15597

Merged
merged 11 commits into from
May 26, 2023
Prev Previous commit
Next Next commit
Rename schema deltas.
  • Loading branch information
clokep committed May 24, 2023
commit 5ba223cb202355fff995300e4fb48667d8e15b0c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ CREATE UNIQUE INDEX event_push_summary_unique_index2 ON event_push_summary (user
-- Recreate some indexes in the background, by re-running the background updates
-- from 72/02event_push_actions_index.sql and 72/06thread_notifications.sql.
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(7403, 'event_push_summary_unique_index2', '{}')
(7706, 'event_push_summary_unique_index2', '{}')
ON CONFLICT (update_name) DO UPDATE SET progress_json = '{}';
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(7403, 'event_push_actions_stream_highlight_index', '{}')
(7706, 'event_push_actions_stream_highlight_index', '{}')
ON CONFLICT (update_name) DO UPDATE SET progress_json = '{}';
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ALTER TABLE event_push_actions
-- We then validate the constraint which doesn't need to worry about new data. It
-- only needs a SHARE UPDATE EXCLUSIVE lock but can still take a while to complete.
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(7605, 'event_push_actions_thread_id', '{}');
(7706, 'event_push_actions_thread_id', '{}');
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ ALTER TABLE event_push_actions_staging
-- We then validate the constraint which doesn't need to worry about new data. It
-- only needs a SHARE UPDATE EXCLUSIVE lock but can still take a while to complete.
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(7605, 'event_push_actions_staging_thread_id', '{}');
(7706, 'event_push_actions_staging_thread_id', '{}');
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ ALTER TABLE event_push_summary
-- We then validate the constraint which doesn't need to worry about new data. It
-- only needs a SHARE UPDATE EXCLUSIVE lock but can still take a while to complete.
INSERT INTO background_updates (ordering, update_name, progress_json) VALUES
(7605, 'event_push_summary_thread_id', '{}'),
(7706, 'event_push_summary_thread_id', '{}'),
-- Also clean-up the old indexes.
(7605, 'event_push_drop_null_thread_id_indexes', '{}');;
(7706, 'event_push_drop_null_thread_id_indexes', '{}');;