diff options
author | reivilibre <38398653+reivilibre@users.noreply.github.com> | 2019-08-20 13:22:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 13:22:07 +0100 |
commit | 8de9ebe35ddd9a0c5e73358fc861f375868b6c84 (patch) | |
tree | 5f574bcf64523751c27b2f27e5f40ccd98541422 /synapse/storage/schema | |
parent | Newsfile (diff) | |
download | synapse-8de9ebe35ddd9a0c5e73358fc861f375868b6c84.tar.xz |
Tear out current room & user statistics (#5880)
* Tear out current room & user statistics. Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net> * Black is back with more linting complaints Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'synapse/storage/schema')
-rw-r--r-- | synapse/storage/schema/delta/56/stats_separated1.sql | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/56/stats_separated1.sql b/synapse/storage/schema/delta/56/stats_separated1.sql new file mode 100644 index 0000000000..5b125d17b0 --- /dev/null +++ b/synapse/storage/schema/delta/56/stats_separated1.sql @@ -0,0 +1,33 @@ +/* Copyright 2018 New Vector Ltd + * Copyright 2019 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. + */ + + +----- First clean up from previous versions of room stats. + +-- First remove old stats stuff +DROP TABLE IF EXISTS room_stats; +DROP TABLE IF EXISTS user_stats; +DROP TABLE IF EXISTS room_stats_earliest_tokens; +DROP TABLE IF EXISTS _temp_populate_stats_position; +DROP TABLE IF EXISTS _temp_populate_stats_rooms; +DROP TABLE IF EXISTS stats_stream_pos; + +-- Unschedule old background updates if they're still scheduled +DELETE FROM background_updates WHERE update_name IN ( + 'populate_stats_createtables', + 'populate_stats_process_rooms', + 'populate_stats_cleanup' +); |