Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion synapse/storage/prepare_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Remember to update this number every time a change is made to database
# schema files, so the users will be informed on server restarts.
SCHEMA_VERSION = 45
SCHEMA_VERSION = 46

dir_path = os.path.abspath(os.path.dirname(__file__))

Expand Down
25 changes: 25 additions & 0 deletions synapse/storage/schema/delta/44/thumbnails_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* Copyright 2016 OpenMarket 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.
*/

CREATE TABLE local_media_repository_thumbnails2 ( media_id TEXT, thumbnail_width INTEGER, thumbnail_height INTEGER, thumbnail_type TEXT, thumbnail_method TEXT, thumbnail_length INTEGER, UNIQUE ( media_id, thumbnail_width, thumbnail_height, thumbnail_type, thumbnail_method ) );
INSERT INTO local_media_repository_thumbnails2 SELECT * FROM local_media_repository_thumbnails;
DROP TABLE local_media_repository_thumbnails;
ALTER TABLE local_media_repository_thumbnails2 RENAME TO local_media_repository_thumbnails;
CREATE INDEX local_media_repository_thumbnails_media_id ON local_media_repository_thumbnails (media_id);

CREATE TABLE remote_media_cache_thumbnails2 ( media_origin TEXT, media_id TEXT, thumbnail_width INTEGER, thumbnail_height INTEGER, thumbnail_method TEXT, thumbnail_type TEXT, thumbnail_length INTEGER, filesystem_id TEXT, UNIQUE ( media_origin, media_id, thumbnail_width, thumbnail_height, thumbnail_type, thumbnail_method ) );
INSERT INTO remote_media_cache_thumbnails2 SELECT * FROM remote_media_cache_thumbnails;
DROP TABLE remote_media_cache_thumbnails;
ALTER TABLE remote_media_cache_thumbnails2 RENAME TO remote_media_cache_thumbnails;