diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2024-06-22 16:54:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-22 16:54:41 +0000 |
commit | a71e967ef3694799d0c418c98332f7ff4cc5f6af (patch) | |
tree | 80b824c109e4e4be1a3a78829ddc4116efe90ee0 | |
parent | e2a622770573866e4e07b95bfead56acac37a4b5 (diff) | |
parent | 45d2b8b536f8065544268f11a63376c5f19f00cc (diff) |
Merge pull request #320983 from Ma27/nc-dbtableprefix
nixos/nextcloud: deprecate dbtableprefix
-rw-r--r-- | nixos/modules/services/web-apps/nextcloud.nix | 15 | ||||
-rw-r--r-- | nixos/tests/nextcloud/basic.nix | 1 |
2 files changed, 14 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index d7eb2c6cb734f..2bf993cffec3f 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -446,7 +446,13 @@ in { dbtableprefix = mkOption { type = types.nullOr types.str; default = null; - description = "Table prefix in Nextcloud's database."; + description = '' + Table prefix in Nextcloud's database. + + __Note:__ since Nextcloud 20 it's not an option anymore to create a database + schema with a custom table prefix. This option only exists for backwards compatibility + with installations that were originally provisioned with Nextcloud <20. + ''; }; adminuser = mkOption { type = types.str; @@ -826,6 +832,13 @@ in { Using config.services.nextcloud.poolConfig is deprecated and will become unsupported in a future release. Please migrate your configuration to config.services.nextcloud.poolSettings. '') + ++ (optional (cfg.config.dbtableprefix != null) '' + Using `services.nextcloud.config.dbtableprefix` is deprecated. Fresh installations with this + option set are not allowed anymore since v20. + + If you have an existing installation with a custom table prefix, make sure it is + set correctly in `config.php` and remove the option from your NixOS config. + '') ++ (optional (versionOlder cfg.package.version "25") (upgradeWarning 24 "22.11")) ++ (optional (versionOlder cfg.package.version "26") (upgradeWarning 25 "23.05")) ++ (optional (versionOlder cfg.package.version "27") (upgradeWarning 26 "23.11")) diff --git a/nixos/tests/nextcloud/basic.nix b/nixos/tests/nextcloud/basic.nix index 2a32f2b4d1992..bea08e3231104 100644 --- a/nixos/tests/nextcloud/basic.nix +++ b/nixos/tests/nextcloud/basic.nix @@ -38,7 +38,6 @@ runTest ({ config, ... }: { services.nextcloud = { enable = true; datadir = "/var/lib/nextcloud-data"; - config.dbtableprefix = "nixos_"; autoUpdateApps = { enable = true; startAt = "20:00"; |