Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migration guide with multi-tenancy changes #3234

Merged
merged 8 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 0 additions & 215 deletions doc/migrations/4.2.0_4.3.0.md

This file was deleted.

57 changes: 57 additions & 0 deletions doc/migrations/4.2.0_5.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## DB migrations

The migrations scripts for Postgres, MySQL, MSSQL can be found in the [`priv/migrations`](../../priv/migrations/) directory. Please remember to provide the existing server domain for the `server` column instead of the localhost.

### Changes in XEPs:
- `mod_last`
- Table `last` - added server column, updated primary key and indexes.
- `mod_privacy`
- Table `privacy_default_list` - added server column, updated primary key and indexes.
- Table `privacy_list` - added server column, updated primary key and indexes.
- `mod_private`
- Table `private_storage` - added server column, updated primary key and indexes, removed unused columns.
- `mod_roster`
- Table `rosterusers` - added server column, updated indexes.
- Table `rostergroups` - added server column, updated indexes.
- Table `roster_version` - added server column, updated primary key and indexes.
- `mod_muc`
- Table `i_muc_light_blocking` - updated indexes.
- `mod_inbox`
- Table `inbox` - updated primary key and indexes.

### Other changes:
- RDBMS auth - modified `users` table.
- Added `domain_settings` table.
- Added `domain_events` table.

## Hook migrations

- `filter_room_packet` hook uses a map instead of a proplist for the event data information.
- `room_send_packet` hook has been removed. Use `filter_room_packet` instead.
- `filter_room_packet` is called for HostType (was for MucHost).
- `forget_room` is called for HostType (was for MucHost).
- `forget_room` takes an extra argument HostType.
- `filter_room_packet` takes an extra argument HostType.
- `is_muc_room_owner` is called for HostType (was for MucHost).
- `is_muc_room_owner` takes an extra argument HostType.
- `muc_room_pid` hook removed.
- `load_permanent_rooms_at_startup` option is ignored now.
- `gen_mod:get_module_opt_by_subhost` API removed.
- `update_inbox_for_muc` is called for HostType.
- `get_mam_muc_gdpr_data` is called for HostType.
- `get_mam_pm_gdpr_data` is called for HostType.
- `get_personal_data` handlers take an extra argument: `HostType` as the second parameter.
- `get_mam_pm_gdpr_data` and `get_mam_muc_gdpr_data` take `HostType` argument.

## Metrics REST API (obsolete)

The API is still considered obsolete so if you are using it,
please consider using [WombatOAM](https://www.erlang-solutions.com/capabilities/wombatoam/)
or metrics reporters as described in [Logging and monitoring](../operation-and-maintenance/Logging-&-monitoring.md).

In each endpoint, `host` has been changed to `host_type`.
This is because the metrics are now collected per host type rather than host.

## Users cache

MongooseIM used to feature a cache to check whether a user exists, that was unavoidably enabled, and had no eviction policy, that is, the cache could continue growing forever. Now, MIM features a module called [`mod_cache_users`](../modules/mod_cache_users) that implements a configurable cache policy, that can be enabled, disabled, and parametrised, per `host_type`. This might not be enabled by default in your configuration, so we recommend you verify your configuration and enable it if needed.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ nav:
- '4.0.0 to 4.0.1': 'migrations/4.0.0_4.0.1.md'
- '4.0.1 to 4.1.0': 'migrations/4.0.1_4.1.0.md'
- '4.1.0 to 4.2.0': 'migrations/4.1.0_4.2.0.md'
- '4.2.0 to 4.3.0': 'migrations/4.2.0_4.3.0.md'
- '4.2.0 to 5.0.0': 'migrations/4.2.0_5.0.0.md'
- 'MAM MUC migration helper': 'migrations/jid-from-mam-muc-script.md'
- Platform:
- 'Contributions to ecosystem': 'Contributions.md'
Expand Down
Loading