Repository navigation
Add MariaDB as a first-class database backend #142
Description
Part of #140 and LibreSign/libresign#8969.
Context
nextcloud-docker-development currently provides explicit MySQL and PostgreSQL database services.
LibreSign's Behat compatibility matrix also exercises MariaDB 10.6 and 10.11.
The parent worker contract defines database selection as:
DB_TYPE=sqlite|mysql|mariadb|pgsql
This issue implements the mariadb branch of that contract.
Goal
Add MariaDB as a first-class selectable database backend in nextcloud-docker-development.
Requirements
- Add a MariaDB service to the database service definitions rather than treating MariaDB as an undocumented MySQL alias.
DB_TYPE=mariadbmust select the MariaDB service and MySQL-compatible Nextcloud database driver.- Keep
DB_HOSTas the connection/service host; do not overload it as the backend selector. - Support programmatic MariaDB version selection without editing Compose YAML.
- Initial supported versions for this work are MariaDB 10.6 and 10.11.
- Do not use an unpinned
latestimage for CI selection. Follow the repository's existing image-pinning/update conventions for the supported versions. - Preserve per-clone/per-worker database storage.
- Preserve readiness checks before Nextcloud installation starts.
- Do not remove or silently replace the existing MySQL backend.
SQL mode contract
LibreSign's current MariaDB Behat workflow enables ONLY_FULL_GROUP_BY.
Provide a generic caller-controlled mechanism for database initialization/session/global SQL configuration that can deterministically enable ONLY_FULL_GROUP_BY before the application test suite runs.
Do not hard-code a LibreSign-named switch.
The automated test for this issue must query @@sql_mode and prove ONLY_FULL_GROUP_BY is active when requested.
Tests
Add automated coverage proving:
DB_TYPE=mariadbwith MariaDB 10.6 starts and installs Nextcloud;DB_TYPE=mariadbwith MariaDB 10.11 starts and installs Nextcloud;- the MariaDB version is selected programmatically;
- requested
ONLY_FULL_GROUP_BYconfiguration is actually active; - two MariaDB workers do not share database state;
- existing MySQL and PostgreSQL backends continue to work.
Documentation
Document:
DB_TYPE=mariadb;- MariaDB version selection;
- the supported versions introduced by this issue;
- the generic mechanism for optional SQL initialization/configuration.
Done when
-
DB_TYPE=mariadbis supported. - MariaDB 10.6 and 10.11 are selectable without editing Compose files.
- Nextcloud autoinstall works against each supported MariaDB version.
- Requested
ONLY_FULL_GROUP_BYconfiguration is proven active by an automated test. - MariaDB database state remains isolated per worker.
- Existing MySQL/PostgreSQL behavior is not regressed.
- Automated tests and documentation cover the backend.
Activity