mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2025-06-27 13:11:50 +02:00
fix mediawiki init script another time
This commit is contained in:
parent
50af56517d
commit
0d01f0c729
@ -185,14 +185,14 @@ in
|
|||||||
# so we don't actually need the index on that column.
|
# so we don't actually need the index on that column.
|
||||||
systemd.services.mediawiki-init.script = lib.mkAfter ''
|
systemd.services.mediawiki-init.script = lib.mkAfter ''
|
||||||
if [ ! -f /var/lib/mediwiki/.mediawiki-job-index-fix ]; then
|
if [ ! -f /var/lib/mediwiki/.mediawiki-job-index-fix ]; then
|
||||||
psql -U postgres -d mediawiki -c <<'EOF'
|
${config.services.postgresql.package}/bin/psql -d ${lib.escapeShellArg config.services.mediawiki.database.name} <<'EOF'
|
||||||
DROP INDEX IF EXISTS job_cmd;
|
DROP INDEX IF EXISTS job_cmd;
|
||||||
-- the original index looks like this, we leave job_params out because it gets too long
|
-- the original index looks like this, we leave job_params out because it gets too long
|
||||||
-- CREATE INDEX job_cmd ON job (job_cmd, job_namespace, job_title, job_params);
|
-- CREATE INDEX job_cmd ON job (job_cmd, job_namespace, job_title, job_params);
|
||||||
-- source: https://github.com/wikimedia/mediawiki/blob/17079782a776849ec51d5c3d3712edc217cce65b/maintenance/postgres/tables-generated.sql#L480
|
-- source: https://github.com/wikimedia/mediawiki/blob/17079782a776849ec51d5c3d3712edc217cce65b/maintenance/postgres/tables-generated.sql#L480
|
||||||
CREATE INDEX job_cmd ON job (job_cmd, job_namespace, job_title);
|
CREATE INDEX job_cmd ON job (job_cmd, job_namespace, job_title);
|
||||||
EOF
|
EOF
|
||||||
touch /var/lib/mediwiki/.mediawiki-job-index-fix
|
touch /var/lib/mediawiki/.mediawiki-job-index-fix
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user