From 53eb6e6ca4c9588eb248801870320616066678a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 7 Jul 2024 18:19:07 +0200 Subject: [PATCH] apply schema workaround to get translation extension to work --- modules/nixos-wiki/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/nixos-wiki/default.nix b/modules/nixos-wiki/default.nix index a14059c..7d1dc92 100644 --- a/modules/nixos-wiki/default.nix +++ b/modules/nixos-wiki/default.nix @@ -179,6 +179,23 @@ in services.postgresql.package = pkgs.postgresql_16; + # Postgresql doesn't have column size index limits unlike MySQL, + # which breaks inserting translation tasks into the database jobqueue. + # As far as I can see nothing tries to query the job_cmd column with a LIKE query, + # so we don't actually need the index on that column. + systemd.services.mediawiki-init.script = lib.mkAfter '' + if [ ! -f /var/lib/mediwiki/.mediawiki-job-index-fix ]; then + psql -U postgres -d mediawiki -c <