Skip to content

Commit db0c5f0

Browse files
committed
Rename from default/new to singlehost/multihost to match 25.10
1 parent f9bf0b4 commit db0c5f0

File tree

33 files changed

+71
-69
lines changed

33 files changed

+71
-69
lines changed

content/admin/configuration/database.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ with the [`default_db`](toplevel.md#default_db) top-level option:
7474

7575
def:update
7676
: Modify the database schema and all its tables to match the installed ejabberd version.
77-
Not to be confused with [upgrade ejabberd](def:upgrade) or [switch schema](def:switch).
77+
Not to be confused with [upgrade ejabberd](def:upgrade) or [convert schema](def:convert).
7878

7979
The [update_sql_schema](toplevel.md#update_sql_schema) top-level option
8080
allows ejabberd to create and update the tables automatically in the SQL database
@@ -103,36 +103,38 @@ The SQL database schema files are available:
103103
See [ejabberd SQL Database Schema](../../developer/sql-schema.md)
104104
for details on database schemas.
105105

106-
## _Default_ and _New_ Schemas
106+
## _Singlehost_ or _Multihost_
107+
108+
<!-- md:version renamed from default/new to singlehost/multihost in [25.10](../../archive/25.10/index.md) -->
107109

108110
If using MySQL, PostgreSQL, Microsoft SQL or SQLite,
109111
you can choose between two database schemas:
110112

111-
- the _default_ schema is preferable when serving one massive domain,
112-
- the _new_ schema is preferable when serving many small domains.
113+
- the _singlehost_ schema is preferable when serving one massive domain, or just a few domains,
114+
- the _multihost_ schema is preferable when serving many small domains.
113115

114-
The _default_ schema stores only one XMPP domain in the database.
116+
The _singlehost_ schema stores only one XMPP domain in the database.
115117
The [XMPP domain](basic.md#xmpp-domains)
116118
is not stored as this is the same for all the accounts,
117119
and this saves space in massive deployments.
118120
However, to handle several domains,
119121
you have to setup one database per domain
120122
and configure each one independently
121123
using [host_config](basic.md#virtual-hosting),
122-
so in that case you may prefer the _new_ schema.
124+
so in that case you may prefer the _multihost_ schema.
123125

124-
The _new_ schema stores the XMPP domain in a new column `server_host`
126+
The _multihost_ schema stores the XMPP domain in a new column `server_host`
125127
in the database entries,
126128
so it allows to handle several XMPP domains in a single ejabberd database.
127129
Using this schema is preferable when serving several XMPP domains
128130
and changing domains from time to time.
129-
However, if you have only one massive domain, you may prefer to use the _default_ schema.
131+
However, if you have only one massive domain, you may prefer to use the _singlehost_ schema.
130132

131-
To use the _new_ schema, edit the ejabberd configuration file and enable
132-
[new_sql_schema](toplevel.md#new_sql_schema) top-level option:
133+
To use the _multihost_ schema, edit the ejabberd configuration file and enable
134+
[sql_schema_multihost](toplevel.md#sql_schema_multihost) top-level option:
133135

134136
``` yaml
135-
new_sql_schema: true
137+
sql_schema_multihost: true
136138
```
137139

138140
When creating the tables, if ejabberd can use the [update_sql_schema](toplevel.md#update_sql_schema)
@@ -141,29 +143,29 @@ it will take care to create the tables with the correct schema.
141143

142144
On the other hand, if you are creating the tables manually,
143145
remember to use the proper SQL schema!
144-
For example, if you are using MySQL and choose the _default_ schema, use `mysql.sql`.
145-
If you are using PostgreSQL and need the _new_ schema, use `pg.new.sql`.
146+
For example, if you are using MySQL and choose the _singlehost_ schema, use `mysql.sql`.
147+
If you are using PostgreSQL and need the _multihost_ schema, use `pg.new.sql`.
146148

147-
def:switch
148-
: Change the database schema and all its tables from `default` schema to `new` schema.
149+
def:convert
150+
: Change the database schema and all its tables from `singlehost` schema to `multihost` schema.
149151
Not to be confused with [upgrade ejabberd](def:upgrade) or [update schema](def:update).
150152

151-
If you already have a MySQL or PostgreSQL database with the _default_ schema and contents,
152-
you can switch it to the _new_ schema:
153+
If you already have a MySQL or PostgreSQL database with the _singlehost_ schema and contents,
154+
you can convert it to the _multihost_ schema:
153155

154156
* *MySQL*:
155157
Edit the file `sql/mysql.old-to.new.sql` which is included with ejabberd,
156158
fill DEFAULT_HOST in the first line,
157159
and import that SQL file in your database.
158-
Then enable the `new_sql_schema` option in the ejabberd configuration,
160+
Then enable the `sql_schema_multihost` top-level option in the ejabberd configuration,
159161
and restart ejabberd.
160162

161163
* *PostgreSQL*:
162-
First enable `new_sql_schema` and
164+
First enable the `sql_schema_multihost` top-level option and
163165
[mod_admin_update_sql](modules.md#mod_admin_update_sql)
164166
in your ejabberd configuration:
165167
``` yaml
166-
new_sql_schema: true
168+
sql_schema_multihost: true
167169
modules:
168170
mod_admin_update_sql: {}
169171
```
@@ -197,7 +199,7 @@ To configure SQL there are several top-level options:
197199
- [sql_start_interval](toplevel.md#sql_start_interval)
198200
- [sql_prepared_statements](toplevel.md#sql_prepared_statements)
199201
- [update_sql_schema](toplevel.md#update_sql_schema), see section [Database Schema](#database-schema)
200-
- [new_sql_schema](toplevel.md#new_sql_schema), see section [Default and New Schemas](#default-and-new-schemas)
202+
- [sql_schema_multihost](toplevel.md#sql_schema_multihost), see section [Singlehost or Multihost](#singlehost-or-multihost)
201203

202204
Example of plain ODBC connection:
203205

content/admin/configuration/modules.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ ejabberdctl srg_create g1 example.org "'Group number 1'" this_is_g1 g1
152152
mod\_admin\_update\_sql
153153
-----------------------
154154

155-
This module can be used to update existing SQL database from the default
156-
to the new schema. Check the section
157-
[Default and New Schemas](database.md#default-and-new-schemas) for
155+
This module can be used to convert your existing SQL database from the
156+
singlehost to the multihost schema. Check the section
157+
[Singlehost or Multihost](database.md#singlehost-or-multihost) for
158158
details. Please note that only MS SQL, MySQL, and PostgreSQL are
159159
supported. When the module is loaded use [update_sql](../../developer/ejabberd-api/admin-api.md#update_sql) API.
160160

content/admin/configuration/toplevel.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ value defined in [queue_type](#queue_type) or `ram` if the latter is not set.
17951795
<!-- md:version renamed in [25.10](../../archive/25.10/index.md) -->
17961796

17971797
Whether to use the
1798-
[multihost SQL schema](database.md#default-and-new-schemas). All
1798+
[multihost SQL schema](database.md#singlehost-or-multihost). All
17991799
schemas are located at
18001800
<https://github.com/processone/ejabberd/tree/25.10/sql>. There are two
18011801
schemas available. The legacy `singlehost` schema stores one XMPP domain
@@ -1804,8 +1804,8 @@ XMPP domains in a single ejabberd database. The `multihost` schema is
18041804
preferable when serving several XMPP domains and/or changing domains
18051805
from time to time. This avoid need to manage several databases and
18061806
handle complex configuration changes. The default depends on
1807-
configuration flag `--enable-sql-schema-multihost` which is set at
1808-
compile time.
1807+
[./configure](../install/source.md#configure) flag
1808+
`--enable-sql-schema-multihost` which is set at compile time.
18091809

18101810
## sql\_server
18111811

content/admin/install/source.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,25 +138,25 @@ This account needs a HOME directory, because the [Erlang cookie file](../guide/s
138138
<!-- md:version added in [21.04](../../archive/21.04/index.md) -->
139139

140140
- **`--enable-mssql`**: Enable Microsoft SQL Server support, this
141-
option requires --enable-odbc (see [Supported storages][18]).
141+
option requires --enable-odbc (see [Supported storages](../configuration/database.md#supported-storages)).
142142

143-
- **`--enable-mysql`**: Enable MySQL support (see [Supported storages][18]).
144-
145-
- **`--enable-new-sql-schema`**: Use new SQL schema.
143+
- **`--enable-mysql`**: Enable MySQL support (see [Supported storages](../configuration/database.md#supported-storages)).
146144

147145
- **`--enable-odbc`**: Enable pure ODBC support.
148146

149147
- **`--enable-pam`**: Enable the PAM authentication method (see [PAM Authentication](../configuration/authentication.md#pam-authentication) section).
150148

151-
- **`--enable-pgsql`**: Enable PostgreSQL support (see [Supported storages][18]).
149+
- **`--enable-pgsql`**: Enable PostgreSQL support (see [Supported storages](../configuration/database.md#supported-storages)).
152150

153151
- **`--enable-redis`**: Enable Redis support to use for external session storage.
154152

155153
- **`--enable-roster-gateway-workaround`**: Turn on workaround for processing gateway subscriptions.
156154

157155
- **`--enable-sip`**: Enable SIP support.
158156

159-
- **`--enable-sqlite`**: Enable SQLite support (see [Supported storages][18]).
157+
- **`--enable-sql-schema-multihost`**: Use multihost SQL schema by default.
158+
159+
- **`--enable-sqlite`**: Enable SQLite support (see [Supported storages](../configuration/database.md#supported-storages)).
160160

161161
- **`--disable-stun`**: Disable STUN/TURN support.
162162

content/admin/upgrade/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
def:upgrade
44
: Install a version of the program newer than the currently installed one.
5-
Not to be confused with [update](def:update) or [switch schema](def:switch).
5+
Not to be confused with [update](def:update) or [convert schema](def:convert).
66

77
def:update
88
: Modify your program installation to match the requirements of the new program version.
99
This usually involves updating your configuration, your database schema, your API client, your custom modules...
10-
Not to be confused with [upgrade ejabberd](def:upgrade) or [switch schema](def:switch).
10+
Not to be confused with [upgrade ejabberd](def:upgrade) or [convert schema](def:convert).
1111

1212
This document contains administration procedure for each version upgrade.
1313
Only upgrade from version N to N+1 is documented and supported.

content/archive/20.12/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod\_admin\_update\_sql
8282

8383
This module can be used to update existing SQL database from the default
8484
to the new schema. Check the section [Default and New
85-
Schemas](../../admin/configuration/database.md#default-and-new-schemas) for details.
85+
Schemas](../../admin/configuration/database.md#singlehost-or-multihost) for details.
8686
When the module is loaded use *update\_sql* ejabberdctl command.
8787

8888
The module has no options.

content/archive/21.01/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod\_admin\_update\_sql
8282

8383
This module can be used to update existing SQL database from the default
8484
to the new schema. Check the section [Default and New
85-
Schemas](../../admin/configuration/database.md#default-and-new-schemas) for details.
85+
Schemas](../../admin/configuration/database.md#singlehost-or-multihost) for details.
8686
When the module is loaded use *update\_sql* ejabberdctl command.
8787

8888
The module has no options.

content/archive/21.04/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod\_admin\_update\_sql
8282

8383
This module can be used to update existing SQL database from the default
8484
to the new schema. Check the section [Default and New
85-
Schemas](../../admin/configuration/database.md#default-and-new-schemas) for details.
85+
Schemas](../../admin/configuration/database.md#singlehost-or-multihost) for details.
8686
When the module is loaded use *update\_sql* ejabberdctl command.
8787

8888
The module has no options.

content/archive/21.07/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod\_admin\_update\_sql
8282

8383
This module can be used to update existing SQL database from the default
8484
to the new schema. Check the section [Default and New
85-
Schemas](../../admin/configuration/database.md#default-and-new-schemas) for details.
85+
Schemas](../../admin/configuration/database.md#singlehost-or-multihost) for details.
8686
Please note that only PostgreSQL is supported. When the module is loaded
8787
use *update\_sql* ejabberdctl command.
8888

content/archive/21.12/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ mod\_admin\_update\_sql
8282

8383
This module can be used to update existing SQL database from the default
8484
to the new schema. Check the section [Default and New
85-
Schemas](../../admin/configuration/database.md#default-and-new-schemas) for details.
85+
Schemas](../../admin/configuration/database.md#singlehost-or-multihost) for details.
8686
Please note that only PostgreSQL is supported. When the module is loaded
8787
use [update_sql](admin-api.md#update_sql) API.
8888

0 commit comments

Comments
 (0)