Ignore the UI Auth sessions when porting from sqlite to postgresql (#7711)
parent
e07a8caf58
commit
6418b0379f
|
@ -0,0 +1 @@
|
||||||
|
The `synapse_port_db` script no longer fails when the `ui_auth_sessions` table is non-empty. This bug has existed since v1.13.0rc1.
|
|
@ -127,6 +127,16 @@ APPEND_ONLY_TABLES = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
IGNORED_TABLES = {
|
||||||
|
"user_directory",
|
||||||
|
"user_directory_search",
|
||||||
|
"users_who_share_rooms",
|
||||||
|
"users_in_pubic_room",
|
||||||
|
"ui_auth_sessions",
|
||||||
|
"ui_auth_sessions_credentials",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Error returned by the run function. Used at the top-level part of the script to
|
# Error returned by the run function. Used at the top-level part of the script to
|
||||||
# handle errors and return codes.
|
# handle errors and return codes.
|
||||||
end_error = None
|
end_error = None
|
||||||
|
@ -289,13 +299,8 @@ class Porter(object):
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
if table in (
|
if table in IGNORED_TABLES:
|
||||||
"user_directory",
|
# We don't port these tables, as they're a faff and we can regenerate
|
||||||
"user_directory_search",
|
|
||||||
"users_who_share_rooms",
|
|
||||||
"users_in_pubic_room",
|
|
||||||
):
|
|
||||||
# We don't port these tables, as they're a faff and we can regenreate
|
|
||||||
# them anyway.
|
# them anyway.
|
||||||
self.progress.update(table, table_size) # Mark table as done
|
self.progress.update(table, table_size) # Mark table as done
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue