From 5ba68f271977efeb6274f6ffc4a6940040d2d6ac Mon Sep 17 00:00:00 2001 From: Nelson Vides Date: Mon, 26 Feb 2024 15:08:06 +0100 Subject: [PATCH] Fix duplicate migration files --- doc/migrations/6.2.0_6.2.1.md | 7 ------- doc/migrations/6.2.0_x.x.x.md | 8 ++++++++ mkdocs.yml | 1 + priv/migrations/mssql_6.2.0_6.2.1.sql | 10 ---------- priv/migrations/mssql_6.2.0_x.x.x.sql | 12 ++++++++++++ priv/migrations/mysql_6.2.0_6.2.1.sql | 7 ------- priv/migrations/mysql_6.2.0_x.x.x.sql | 9 +++++++++ priv/migrations/pgsql_6.2.0_6.2.1.sql | 7 ------- priv/migrations/pgsql_6.2.0_x.x.x.sql | 9 +++++++++ 9 files changed, 39 insertions(+), 31 deletions(-) delete mode 100644 doc/migrations/6.2.0_6.2.1.md delete mode 100644 priv/migrations/mssql_6.2.0_6.2.1.sql delete mode 100644 priv/migrations/mysql_6.2.0_6.2.1.sql delete mode 100644 priv/migrations/pgsql_6.2.0_6.2.1.sql diff --git a/doc/migrations/6.2.0_6.2.1.md b/doc/migrations/6.2.0_6.2.1.md deleted file mode 100644 index 05b89f5cd9f..00000000000 --- a/doc/migrations/6.2.0_6.2.1.md +++ /dev/null @@ -1,7 +0,0 @@ -## Presences - -`mod_presences` was internally refactored to modernise and improve the performance of the code, but as a side-effect, code for [XEP-0018](https://xmpp.org/extensions/xep-0018.html) was removed. Note that this XEP was not advertised and as a matter of fact was deprecated already in 2003, so if your client was depending on it, it is high time to update. - -## Roster - -`mod_roster` was internally refactored to modernise and improve the performance of the code, but as a side-effect, some database migrations need to be carried. See the migrations for Postgres, MySQL and MSSQL in the [`priv/migrations`](https://github.com/esl/MongooseIM/tree/master/priv/migrations) directory. diff --git a/doc/migrations/6.2.0_x.x.x.md b/doc/migrations/6.2.0_x.x.x.md index 5b1df61df69..d03a67e1c17 100644 --- a/doc/migrations/6.2.0_x.x.x.md +++ b/doc/migrations/6.2.0_x.x.x.md @@ -1,3 +1,11 @@ ## Database migration There is a new column in the `mam_message` table in the database, which is used to support including or excluding groupchat results in a user archive. See the migrations for Postgres, MySQL and MSSQL in the [`priv/migrations`](https://github.com/esl/MongooseIM/tree/master/priv/migrations) directory. Please be aware that the filtering process will only be effective for new messages and will not apply to those messages that have already been stored in the database. + +## Presences + +`mod_presences` was internally refactored to modernise and improve the performance of the code, but as a side-effect, code for [XEP-0018](https://xmpp.org/extensions/xep-0018.html) was removed. Note that this XEP was not advertised and as a matter of fact was deprecated already in 2003, so if your client was depending on it, it is high time to update. + +## Roster + +`mod_roster` was internally refactored to modernise and improve the performance of the code, but as a side-effect, some database migrations need to be carried. See the migrations for Postgres, MySQL and MSSQL in the [`priv/migrations`](https://github.com/esl/MongooseIM/tree/master/priv/migrations) directory. diff --git a/mkdocs.yml b/mkdocs.yml index c5a2c0b9fbc..0442b257db2 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -193,6 +193,7 @@ nav: - '5.1.0 to 6.0.0': 'migrations/5.1.0_6.0.0.md' - '6.0.0 to 6.1.0': 'migrations/6.0.0_6.1.0.md' - '6.1.0 to 6.2.0': 'migrations/6.1.0_6.2.0.md' + - '6.2.0 to 6.x.x': 'migrations/6.2.0_x.x.x.md' - 'MAM MUC migration helper': 'migrations/jid-from-mam-muc-script.md' - 'Contributions to the Ecosystem': 'Contributions.md' - 'MongooseIM History': 'History.md' diff --git a/priv/migrations/mssql_6.2.0_6.2.1.sql b/priv/migrations/mssql_6.2.0_6.2.1.sql deleted file mode 100644 index 45c4ce985ee..00000000000 --- a/priv/migrations/mssql_6.2.0_6.2.1.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP INDEX i_rosteru_server_user_jid ON rosterusers; -DROP INDEX i_rosteru_server_user ON rosterusers; -DROP INDEX i_rosteru_jid ON rosterusers; -ALTER TABLE rosterusers -ADD CONSTRAINT PK_rosterusers PRIMARY KEY CLUSTERED (server ASC, username ASC, jid ASC); - -DROP INDEX i_rosteru_jid ON rostergroups; -ALTER TABLE rostergroups -ALTER COLUMN grp VARCHAR(250), -ADD CONSTRAINT PK_rostergroups PRIMARY KEY CLUSTERED (server ASC, username ASC, jid ASC, grp ASC); diff --git a/priv/migrations/mssql_6.2.0_x.x.x.sql b/priv/migrations/mssql_6.2.0_x.x.x.sql index ce96655074a..bb099988704 100644 --- a/priv/migrations/mssql_6.2.0_x.x.x.sql +++ b/priv/migrations/mssql_6.2.0_x.x.x.sql @@ -1,3 +1,15 @@ +-- Update roster schema +DROP INDEX i_rosteru_server_user_jid ON rosterusers; +DROP INDEX i_rosteru_server_user ON rosterusers; +DROP INDEX i_rosteru_jid ON rosterusers; +ALTER TABLE rosterusers +ADD CONSTRAINT PK_rosterusers PRIMARY KEY CLUSTERED (server ASC, username ASC, jid ASC); + +DROP INDEX i_rosteru_jid ON rostergroups; +ALTER TABLE rostergroups +ALTER COLUMN grp VARCHAR(250), +ADD CONSTRAINT PK_rostergroups PRIMARY KEY CLUSTERED (server ASC, username ASC, jid ASC, grp ASC); + -- Store information whether the message is of type "groupchat" in the user's archive ALTER TABLE mam_message ADD is_groupchat smallint NOT NULL DEFAULT 0; diff --git a/priv/migrations/mysql_6.2.0_6.2.1.sql b/priv/migrations/mysql_6.2.0_6.2.1.sql deleted file mode 100644 index 3cdcdcc4965..00000000000 --- a/priv/migrations/mysql_6.2.0_6.2.1.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP INDEX i_rosteru_server_user_jid ON rosterusers; -DROP INDEX i_rosteru_server_user ON rosterusers; -DROP INDEX i_rosteru_jid ON rosterusers; -ALTER TABLE rosterusers ADD PRIMARY KEY(server, username, jid); - -DROP INDEX i_rosterg_server_user_jid ON rostergroups; -ALTER TABLE rostergroups MODIFY COLUMN grp VARCHAR(255), ADD PRIMARY KEY(server, username, jid, grp); diff --git a/priv/migrations/mysql_6.2.0_x.x.x.sql b/priv/migrations/mysql_6.2.0_x.x.x.sql index 30796bd78d5..48eea8e950f 100644 --- a/priv/migrations/mysql_6.2.0_x.x.x.sql +++ b/priv/migrations/mysql_6.2.0_x.x.x.sql @@ -1,3 +1,12 @@ +-- Update roster schema +DROP INDEX i_rosteru_server_user_jid ON rosterusers; +DROP INDEX i_rosteru_server_user ON rosterusers; +DROP INDEX i_rosteru_jid ON rosterusers; +ALTER TABLE rosterusers ADD PRIMARY KEY(server, username, jid); + +DROP INDEX i_rosterg_server_user_jid ON rostergroups; +ALTER TABLE rostergroups MODIFY COLUMN grp VARCHAR(255), ADD PRIMARY KEY(server, username, jid, grp); + -- Store information whether the message is of type "groupchat" in the user's archive ALTER TABLE mam_message ADD COLUMN is_groupchat boolean NOT NULL DEFAULT false; diff --git a/priv/migrations/pgsql_6.2.0_6.2.1.sql b/priv/migrations/pgsql_6.2.0_6.2.1.sql deleted file mode 100644 index 3c6622f27ea..00000000000 --- a/priv/migrations/pgsql_6.2.0_6.2.1.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP INDEX i_rosteru_server_user_jid; -DROP INDEX i_rosteru_server_user; -DROP INDEX i_rosteru_jid; -ALTER TABLE rosterusers ADD PRIMARY KEY (server, username, jid); - -DROP INDEX i_rosterg_server_user_jid; -ALTER TABLE rostergroups ADD PRIMARY KEY (server, username, jid, grp); diff --git a/priv/migrations/pgsql_6.2.0_x.x.x.sql b/priv/migrations/pgsql_6.2.0_x.x.x.sql index 30796bd78d5..50d2f47baf0 100644 --- a/priv/migrations/pgsql_6.2.0_x.x.x.sql +++ b/priv/migrations/pgsql_6.2.0_x.x.x.sql @@ -1,3 +1,12 @@ +-- Update roster schema +DROP INDEX i_rosteru_server_user_jid; +DROP INDEX i_rosteru_server_user; +DROP INDEX i_rosteru_jid; +ALTER TABLE rosterusers ADD PRIMARY KEY (server, username, jid); + +DROP INDEX i_rosterg_server_user_jid; +ALTER TABLE rostergroups ADD PRIMARY KEY (server, username, jid, grp); + -- Store information whether the message is of type "groupchat" in the user's archive ALTER TABLE mam_message ADD COLUMN is_groupchat boolean NOT NULL DEFAULT false;