-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4230 from esl/fix_duplicate_migrations
Fix duplicate migration files
- Loading branch information
Showing
9 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |