mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2025-06-26 20:51:56 +02:00
fix mediawiki-init script
This commit is contained in:
parent
53eb6e6ca4
commit
519c800589
@ -185,13 +185,13 @@ 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 <<SQL
|
psql -U postgres -d mediawiki -c <<'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);
|
||||||
SQL
|
EOF
|
||||||
touch /var/lib/mediwiki/.mediawiki-job-index-fix
|
touch /var/lib/mediwiki/.mediawiki-job-index-fix
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user