aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-09-27 12:05:49 +0200
committerBadlop <badlop@process-one.net>2021-09-27 13:05:18 +0200
commitf74a715713e90d34d07a4070f839a3d828430b36 (patch)
tree8b196eb7cd27f0c6a15374361cc8a4bf10f80c6e
parentUpdate export/import of scram password to XEP-0227 1.1 (#3676) (diff)
Add indexes from 95fa43aa to the old-to-new schema update function
-rw-r--r--src/mod_admin_update_sql.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mod_admin_update_sql.erl b/src/mod_admin_update_sql.erl
index 4e932fe83..02beb4bf8 100644
--- a/src/mod_admin_update_sql.erl
+++ b/src/mod_admin_update_sql.erl
@@ -140,6 +140,7 @@ update_tables(State) ->
add_sh_column(State, "sr_group"),
add_pkey(State, "sr_group", ["server_host", "name"]),
+ create_unique_index(State, "sr_group", "i_sr_group_sh_name", ["server_host", "name"]),
drop_sh_default(State, "sr_group"),
add_sh_column(State, "sr_user"),
@@ -147,6 +148,7 @@ update_tables(State) ->
drop_index(State, "i_sr_user_jid"),
drop_index(State, "i_sr_user_grp"),
add_pkey(State, "sr_user", ["server_host", "jid", "grp"]),
+ create_unique_index(State, "sr_user", "i_sr_user_sh_jid_grp", ["server_host", "jid", "grp"]),
create_index(State, "sr_user", "i_sr_user_sh_jid", ["server_host", "jid"]),
create_index(State, "sr_user", "i_sr_user_sh_grp", ["server_host", "grp"]),
drop_sh_default(State, "sr_user"),