Skip to content

Commit 48d7bd5

Browse files
authored
Fixes #647 - Removed MySQL/MariaDB support for Zammad 7
1 parent ea8b977 commit 48d7bd5

File tree

7 files changed

+23
-135
lines changed

7 files changed

+23
-135
lines changed

appendix/backup-and-restore/migrate-hosts.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Step 2: Install Zammad on the destination host
3030
Have a look at the installation instructions:
3131

3232
* :doc:`Package Installation </install/package>`
33-
* :doc:`Source Installation </install/package>`
3433
* :doc:`Install with Docker </install/docker-compose>`
3534

3635
Step 3: Activate maintenance mode

appendix/backup-and-restore/restore.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ your data.
2626
independent directory. You're working out of script and
2727
documentation scope!
2828

29-
* PostgreSQL based installations will drop and re-create the database!
30-
MySQL / MariaDB based installations restore on the existing database.
29+
* It will drop and re-create the database!
3130
* You require at least twice the backed up Zammad instance size of free
3231
storage. If you have the dump only, factor 3 could be a good number.
3332

appendix/configure-database-server.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ Configure Database Server
33

44
.. note::
55

6-
Parts of this page also applies to both supported database servers.
76
We can't provide a complete how to and will only enlighten the relevant parts for Zammad.
87

98
Within ``database.yml`` (``config/`` directory) you can define the allowed pool size.
@@ -13,11 +12,6 @@ This should be fairly enough for *every* use case.
1312
If you experience database connection timeouts or similar pool errors, this usually
1413
indicates to other issues that are relevant to your PostgreSQL.
1514

16-
.. note::
17-
18-
Below only affects PostgreSQL-Servers. All relevant steps for MySQL are mentioned on
19-
:doc:`/prerequisites/software` because they're relevant *before* installation.
20-
2115
Below you can the locations of the relevant PostgreSQL configuration files to adjust.
2216
Keep in mind that versions may differ from your setup - adapt where needed.
2317

appendix/includes/mysql-deprication-note.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

appendix/migrate-to-postgresql.rst

Lines changed: 18 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
Migrate to PostgreSQL Server
22
============================
33

4-
.. include:: /appendix/includes/mysql-deprication-note.rst
4+
The following guide will give you some hints for the migration from
5+
MySQL/MariaDB to PostgreSQL. Starting with Zammad 7, the only supported database
6+
server is PostgreSQL.
57

6-
The following guide will provide you with a rough direction through that
7-
migration process.
8-
9-
.. note:: **🤓 Zammad version requirement ahead**
10-
11-
Below commands will only work with Zammad 5.3.0 or higher.
12-
Please make sure to update the latest (MySQL supported) version first.
13-
14-
.. warning:: **Proof of concept ahead**
15-
16-
As the technical details may differ from system to system, this guide
17-
comes without any warranty. Please proceed at your own risk. In doubt
18-
please refer to the documentation of the tools used.
8+
.. warning::
199

10+
- The commands on this page will only work with Zammad 5.3 or higher.
11+
- Make sure to migrate **before** upgrading to Zammad 7. An upgrade
12+
to Zammad 7 is not possible on a MySQL installation.
13+
- As the technical details may differ from system to system, this guide
14+
comes without any warranty. Please proceed at your own risk. In doubt,
15+
please refer to the documentation of the tools used.
2016

2117
Preparation
2218
-----------
@@ -29,25 +25,13 @@ Preparation
2925
3026
#. Create a backup of your instance.
3127

32-
3328
Install PostgreSQL
3429
^^^^^^^^^^^^^^^^^^
3530

3631
.. include:: /install/includes/postgres-installation.rst
3732

3833
Please also have a look at :doc:`/appendix/configure-database-server`.
3934

40-
.. tabs::
41-
42-
.. tab:: Package installation
43-
44-
Nothing to do, continue with the next step. 🎉
45-
46-
.. tab:: Source code installations
47-
48-
.. include:: /install/includes/postgres-dependencies.rst
49-
50-
5135
Install pgloader
5236
^^^^^^^^^^^^^^^^
5337

@@ -79,21 +63,9 @@ Create pgloader Command File
7963

8064
Create a command file for pgloader with:
8165

82-
.. tabs::
83-
84-
.. tab:: Package installation
85-
86-
.. code-block:: sh
87-
88-
$ zammad run rake zammad:db:pgloader > /tmp/pgloader-command
89-
90-
.. tab:: Source installation
91-
92-
.. code-block:: sh
93-
94-
$ su - zammad
95-
$ rake zammad:db:pgloader > /tmp/pgloader-command
66+
.. code-block:: sh
9667
68+
$ zammad run rake zammad:db:pgloader > /tmp/pgloader-command
9769
9870
Afterwards, you need to tweak the created file with the correct URL
9971
of the target PostgreSQL server.
@@ -110,7 +82,6 @@ example.
11082
Verify the rest of the MySQL credentials in the command file, they should reflect the
11183
configuration of your current environment.
11284

113-
11485
Database Credentials
11586
^^^^^^^^^^^^^^^^^^^^
11687

@@ -120,27 +91,14 @@ PostgreSQL server. Use ``postgresql`` as ``adapter``.
12091

12192
.. include:: /install/includes/postgres-permissions.rst
12293

123-
12494
Create Empty Database
12595
^^^^^^^^^^^^^^^^^^^^^
12696

12797
Now you need to create an empty database in PostgreSQL.
12898

129-
.. tabs::
130-
131-
.. tab:: Package installation
132-
133-
.. code-block:: sh
134-
135-
$ zammad run rake db:create
136-
137-
.. tab:: Source installation
138-
139-
.. code-block:: sh
140-
141-
$ su - zammad
142-
$ rake db:create
99+
.. code-block:: sh
143100
101+
$ zammad run rake db:create
144102
145103
Migrate
146104
-------
@@ -163,27 +121,12 @@ Migrate
163121
164122
$ pgloader --verbose /tmp/pgloader-command
165123
166-
167124
Finishing
168125
---------
169126

170-
After the migration has completed, you'll better clear some cache files:
171-
172-
.. tabs::
173-
174-
.. tab:: Package installation
175-
176-
.. code-block:: sh
177-
178-
$ zammad run rails r 'Rails.cache.clear'
179-
$ systemctl start zammad
180-
181-
.. tab:: Source installation
182-
183-
.. code-block:: sh
127+
After the migration has completed, it is recommended to remove some cache files:
184128

185-
$ su - zammad
186-
$ rails r 'Rails.cache.clear'
129+
.. code-block:: sh
187130
188-
# Run as root
189-
$ systemctl start zammad
131+
$ zammad run rails r 'Rails.cache.clear'
132+
$ systemctl start zammad

install/includes/postgres-dependencies.rst

Lines changed: 0 additions & 27 deletions
This file was deleted.

prerequisites/software.rst

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -129,36 +129,18 @@ automatically be installed with the Zammad-Package.
129129
2.3 Database Server
130130
^^^^^^^^^^^^^^^^^^^
131131

132-
Zammad will store all content in a database.
133-
You can choose between the following database servers:
132+
Zammad stores its content in a database. The supported database system is
133+
`PostgreSQL <https://www.postgresql.org/>`_ 10 or newer.
134134

135-
* PostgreSQL 10+
136-
* MySQL 5.7+ / MariaDB 10.3+ (⚠️ deprecated with Zammad 7.0+)
137-
138-
.. danger::
139-
140-
.. include:: /appendix/includes/mysql-deprication-note.rst
135+
If no PostgreSQL server could be detected, it will be installed automatically
136+
during the package installation.
141137

142138
.. note::
143139
If you use database connection pooling software like PgBouncer, make sure
144140
to use a pooling mode that is fully compatible with PostgreSQL. Typically
145141
this is called "session connection pooling". Transaction-based connection
146142
pooling is not supported and may lead to errors during database migrations.
147143

148-
For **MySQL/MariaDB**, the following configuration is required:
149-
150-
* Use ``UTF-8`` encoding - ``utf8mb4`` for example will fail!
151-
* Set ``max_allowed_packet`` to a value larger than the default of 4 MB
152-
(64 MB+ recommended).
153-
154-
You may also want to consider the following settings for your **MySQL** server::
155-
156-
innodb_file_format = Barracuda
157-
innodb_file_per_table = on
158-
innodb_default_row_format = dynamic
159-
innodb_large_prefix = 1
160-
innodb_file_format_max = Barracuda
161-
162144
2.4 Reverse Proxy
163145
^^^^^^^^^^^^^^^^^
164146

0 commit comments

Comments
 (0)