mirror of
https://github.com/matrix-org/synapse.git
synced 2025-01-13 03:36:46 +00:00
Use USING when joining erased_users
This commit is contained in:
parent
060d990eaa
commit
30bd2bf106
@ -261,7 +261,7 @@ class DataStore(
|
||||
sql_base = f"""
|
||||
FROM users as u
|
||||
LEFT JOIN profiles AS p ON u.name = '@' || p.user_id || ':' || ?
|
||||
LEFT JOIN erased_users AS eu ON u.name = eu.user_id
|
||||
LEFT JOIN erased_users AS eu USING(user_id)
|
||||
{where_clause}
|
||||
"""
|
||||
sql = "SELECT COUNT(*) as total_users " + sql_base
|
||||
|
Loading…
Reference in New Issue
Block a user