Page MenuHomePhabricator

mode in which update.php only prints actual DB changes
Open, MediumPublicFeature

Description

Our team has a make master command to update a MediaWiki server to master which we run dozens of times a day. We want to know the 0.5% of the time that it makes DB changes. So I want this to run update.php but only output actual DB changes, not 230 lines of "... already exists/already set/already logged as completed"

Unfortunately both "... already done it" and "OMG changed something" messages go through the same output() function, so --quiet shuts both off. The best I can do is pipe output through sed -n '/^[^.]/p to strip lines starting with dot, but that still outputs some irrelevant lines

Depending on the size of your database this may take a while!
Turning off Content Handler DB fields for this part of upgrade.
Content Handler DB fields should be usable now.
Done in 0:01.

I propose --quiet output any actual DB change lines rather than suppress them. I think that's simpler than adding another flag like --report ("when --quiet set, still print out any database changes"), but the latter would be fine.

This is similar to bug 22753 and bug 32508.


Version: 1.23.0
Severity: enhancement

Details

Reference
bz59857

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:32 AM
bzimport set Reference to bz59857.
bzimport added a subscriber: Unknown Object (MLST).

There is a --schema option, to this file is only written, when there actually changes, so having a empty file means no changes.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:23 PM
Aklapper removed subscribers: Spage, wikibugs-l-list.