diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-09-25 01:34:37 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-09-25 01:35:01 +0200 |
commit | 0a564318e84a720f2139a3927e622e85583102e1 (patch) | |
tree | 3f22b5150e0ebc811c3e5be87ac750214d6a50ad /nixos | |
parent | 96de24efbad1e3f766251341db332133971913fa (diff) |
nixos/onlyoffice: fix database upgrades
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-apps/onlyoffice.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/onlyoffice.nix b/nixos/modules/services/web-apps/onlyoffice.nix index ad0a527759ca8..db4a9582794e6 100644 --- a/nixos/modules/services/web-apps/onlyoffice.nix +++ b/nixos/modules/services/web-apps/onlyoffice.nix @@ -252,7 +252,10 @@ in .rabbitmq.url = "${cfg.rabbitmqUrl}" ' /run/onlyoffice/config/default.json | sponge /run/onlyoffice/config/default.json - if ! psql -d onlyoffice -c "SELECT 'task_result'::regclass;" >/dev/null; then + if psql -d onlyoffice -c "SELECT 'task_result'::regclass;" >/dev/null; then + psql -f ${cfg.package}/var/www/onlyoffice/documentserver/server/schema/postgresql/removetbl.sql + psql -f ${cfg.package}/var/www/onlyoffice/documentserver/server/schema/postgresql/createdb.sql + else psql -f ${cfg.package}/var/www/onlyoffice/documentserver/server/schema/postgresql/createdb.sql fi ''; |