This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Temporarily remove 73-series migrations"
This reverts commit 23668a8.
- Loading branch information
David Robertson
committed
Sep 22, 2022
1 parent
fff89f3
commit fc08bc1
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
synapse/storage/schema/main/delta/73/01event_failed_pull_attempts.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* Copyright 2022 The Matrix.org Foundation C.I.C | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
|
||
-- Add a table that keeps track of when we failed to pull an event over | ||
-- federation (via /backfill, `/event`, `/get_missing_events`, etc). This allows | ||
-- us to be more intelligent when we decide to retry (we don't need to fail over | ||
-- and over) and we can process that event in the background so we don't block | ||
-- on it each time. | ||
CREATE TABLE IF NOT EXISTS event_failed_pull_attempts( | ||
room_id TEXT NOT NULL REFERENCES rooms (room_id), | ||
event_id TEXT NOT NULL, | ||
num_attempts INT NOT NULL, | ||
last_attempt_ts BIGINT NOT NULL, | ||
last_cause TEXT NOT NULL, | ||
PRIMARY KEY (room_id, event_id) | ||
); |
16 changes: 16 additions & 0 deletions
16
synapse/storage/schema/main/delta/73/02add_pusher_enabled.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Copyright 2022 The Matrix.org Foundation C.I.C | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
ALTER TABLE pushers ADD COLUMN enabled BOOLEAN; |
22 changes: 22 additions & 0 deletions
22
synapse/storage/schema/main/delta/73/02room_id_indexes_for_purging.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* Copyright 2022 The Matrix.org Foundation C.I.C | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- Add index so we can easily purge all rows from a given `room_id` | ||
CREATE INDEX IF NOT EXISTS event_failed_pull_attempts_room_id ON event_failed_pull_attempts(room_id); | ||
|
||
-- MSC2716 related tables: | ||
-- Add indexes so we can easily purge all rows from a given `room_id` | ||
CREATE INDEX IF NOT EXISTS insertion_events_room_id ON insertion_events(room_id); | ||
CREATE INDEX IF NOT EXISTS batch_events_room_id ON batch_events(room_id); |
20 changes: 20 additions & 0 deletions
20
synapse/storage/schema/main/delta/73/03pusher_device_id.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* Copyright 2022 The Matrix.org Foundation C.I.C | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- Add a device_id column to track the device ID that created the pusher. It's NULLable | ||
-- on purpose, because a) it might not be possible to track down the device that created | ||
-- old pushers (pushers.access_token and access_tokens.device_id are both NULLable), and | ||
-- b) access tokens retrieved via the admin API don't have a device associated to them. | ||
ALTER TABLE pushers ADD COLUMN device_id TEXT; |