From 95e41f368b19996872a1661d7066670fe65f1eba Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 22 Jun 2020 08:04:14 -0400 Subject: Allow local media to be marked as safe from being quarantined. (#7718) --- scripts/synapse_port_db | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db index 810e08beb5..c2023f3e4d 100755 --- a/scripts/synapse_port_db +++ b/scripts/synapse_port_db @@ -89,6 +89,7 @@ BOOLEAN_COLUMNS = { "account_validity": ["email_sent"], "redactions": ["have_censored"], "room_stats_state": ["is_federatable"], + "local_media_repository": ["safe_from_quarantine"], } -- cgit 1.5.1 From 24110255cd5f304bd380e8f58c30137489e7522e Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 23 Jun 2020 07:33:25 -0400 Subject: Sync ignored table names in synapse_port_db to current database schema (#7717) --- changelog.d/7717.bugfix | 1 + scripts/synapse_port_db | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 changelog.d/7717.bugfix (limited to 'scripts') diff --git a/changelog.d/7717.bugfix b/changelog.d/7717.bugfix new file mode 100644 index 0000000000..bcbf146fea --- /dev/null +++ b/changelog.d/7717.bugfix @@ -0,0 +1 @@ +Fix the tables ignored by `synapse_port_db` to be in sync the current database schema. diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db index c2023f3e4d..2eb795192f 100755 --- a/scripts/synapse_port_db +++ b/scripts/synapse_port_db @@ -129,10 +129,20 @@ APPEND_ONLY_TABLES = [ IGNORED_TABLES = { + # We don't port these tables, as they're a faff and we can regenerate + # them anyway. "user_directory", "user_directory_search", - "users_who_share_rooms", - "users_in_pubic_room", + "user_directory_search_content", + "user_directory_search_docsize", + "user_directory_search_segdir", + "user_directory_search_segments", + "user_directory_search_stat", + "user_directory_search_pos", + "users_who_share_private_rooms", + "users_in_public_room", + # UI auth sessions have foreign keys so additional care needs to be taken, + # the sessions are transient anyway, so ignore them. "ui_auth_sessions", "ui_auth_sessions_credentials", } @@ -301,8 +311,6 @@ class Porter(object): return if table in IGNORED_TABLES: - # We don't port these tables, as they're a faff and we can regenerate - # them anyway. self.progress.update(table, table_size) # Mark table as done return -- cgit 1.5.1