@@ -74,7 +74,7 @@ with the [`default_db`](toplevel.md#default_db) top-level option:
7474
7575def: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
7979The [update_sql_schema](toplevel.md#update_sql_schema) top-level option
8080allows ejabberd to create and update the tables automatically in the SQL database
@@ -103,36 +103,38 @@ The SQL database schema files are available:
103103See [ejabberd SQL Database Schema](../../developer/sql-schema.md)
104104for 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
108110If using MySQL, PostgreSQL, Microsoft SQL or SQLite,
109111you 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.
115117The [XMPP domain](basic.md#xmpp-domains)
116118is not stored as this is the same for all the accounts,
117119and this saves space in massive deployments.
118120However, to handle several domains,
119121you have to setup one database per domain
120122and configure each one independently
121123using [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`
125127in the database entries,
126128so it allows to handle several XMPP domains in a single ejabberd database.
127129Using this schema is preferable when serving several XMPP domains
128130and 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
138140When 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
142144On the other hand, if you are creating the tables manually,
143145remember 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*:
155157Edit the file `sql/mysql.old-to.new.sql` which is included with ejabberd,
156158fill DEFAULT_HOST in the first line,
157159and 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,
159161and 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)
164166in 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
202204Example of plain ODBC connection :
203205
0 commit comments