diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-05-16 13:26:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-16 13:26:07 +0100 |
commit | d648f65aaf465a69f47041ddad8c3b0f32ba38e6 (patch) | |
tree | 403d856c99a3a953eb384861c589d008e4f060ae /synapse/storage/schema | |
parent | Merge pull request #2221 from psaavedra/sync_timeline_limit_filter_by_name (diff) | |
parent | Add a comment to old delta (diff) | |
download | synapse-d648f65aaf465a69f47041ddad8c3b0f32ba38e6.tar.xz |
Merge pull request #2218 from matrix-org/rav/event_search_index
Add an index to event_search
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r-- | synapse/storage/schema/delta/37/remove_auth_idx.py | 4 | ||||
-rw-r--r-- | synapse/storage/schema/delta/41/event_search_event_id_idx.sql | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/37/remove_auth_idx.py b/synapse/storage/schema/delta/37/remove_auth_idx.py index 784f3b348f..20ad8bd5a6 100644 --- a/synapse/storage/schema/delta/37/remove_auth_idx.py +++ b/synapse/storage/schema/delta/37/remove_auth_idx.py @@ -36,6 +36,10 @@ DROP INDEX IF EXISTS transactions_have_ref; -- and is used incredibly rarely. DROP INDEX IF EXISTS events_order_topo_stream_room; +-- an equivalent index to this actually gets re-created in delta 41, because it +-- turned out that deleting it wasn't a great plan :/. In any case, let's +-- delete it here, and delta 41 will create a new one with an added UNIQUE +-- constraint DROP INDEX IF EXISTS event_search_ev_idx; """ diff --git a/synapse/storage/schema/delta/41/event_search_event_id_idx.sql b/synapse/storage/schema/delta/41/event_search_event_id_idx.sql new file mode 100644 index 0000000000..5d9cfecf36 --- /dev/null +++ b/synapse/storage/schema/delta/41/event_search_event_id_idx.sql @@ -0,0 +1,17 @@ +/* Copyright 2017 Vector Creations Ltd + * + * 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. + */ + +INSERT into background_updates (update_name, progress_json) + VALUES ('event_search_event_id_idx', '{}'); |