25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

New SQL schema migrate fix

'server_host' column on 'route' table already exists in old schema and
does not need adding for new schema migration.
This commit is contained in:
Stu Tomlinson 2022-11-17 12:03:09 +00:00
parent 19f2f1fa86
commit 93bf4d5411
2 changed files with 0 additions and 10 deletions

View File

@ -170,11 +170,6 @@
-- CREATE INDEX i_mix_pam_us ON mix_pam (username, server_host);
-- ALTER TABLE mix_pam ALTER COLUMN server_host DROP DEFAULT;
-- ALTER TABLE route ADD COLUMN server_host text NOT NULL DEFAULT '<HOST>';
-- DROP INDEX i_route;
-- CREATE UNIQUE INDEX i_route ON route USING btree (domain, server_host, node, pid);
-- ALTER TABLE i_route ALTER COLUMN server_host DROP DEFAULT;
-- ALTER TABLE mqtt_pub ADD COLUMN server_host text NOT NULL DEFAULT '<HOST>';
-- DROP INDEX i_mqtt_topic;
-- CREATE UNIQUE INDEX i_mqtt_topic_server ON mqtt_pub (topic, server_host);

View File

@ -271,11 +271,6 @@ update_tables(State) ->
create_index(State, "mix_pam", "i_mix_pam_us", ["username", "server_host"]),
drop_sh_default(State, "mix_pam"),
add_sh_column(State, "route"),
drop_index(State, "i_route"),
create_unique_index(State, "route", "i_route", ["domain", "server_host", "node", "pid"]),
drop_sh_default(State, "route"),
add_sh_column(State, "mqtt_pub"),
drop_index(State, "i_mqtt_topic"),
create_unique_index(State, "mqtt_pub", "i_mqtt_topic_server", ["topic", "server_host"]),