1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/synapse_port_db b/scripts/synapse_port_db
index 6def90c015..2c9a6460ec 100755
--- a/scripts/synapse_port_db
+++ b/scripts/synapse_port_db
@@ -94,6 +94,7 @@ BOOLEAN_COLUMNS = {
"local_media_repository": ["safe_from_quarantine"],
"users": ["shadow_banned"],
"e2e_fallback_keys_json": ["used"],
+ "access_tokens": ["used"],
}
@@ -309,7 +310,8 @@ class Porter(object):
information_schema.table_constraints AS tc
INNER JOIN information_schema.constraint_column_usage AS ccu
USING (table_schema, constraint_name)
- WHERE tc.constraint_type = 'FOREIGN KEY';
+ WHERE tc.constraint_type = 'FOREIGN KEY'
+ AND tc.table_name != ccu.table_name;
"""
txn.execute(sql)
|