Page MenuHomePhabricator

CheckUser update.php fails to run for SQLite and PostgreSQL
Closed, ResolvedPublicBUG REPORT

Description

Summary

The CheckUser extension update.php process fails for SQLite and PostgreSQL as demonstrated in this failed CI run and this failed CI run

Background

  • SQLite updates often use temporary tables to make changes
    • This means that when dropping or adding columns, the temporary table could not match what the current state of the table actually is
    • Therefore, updates need to be skipped to ensure that SQLite wikis do not have the updates run when the temporary table is out of date and would cause data loss / a failed query
  • Additionally, the sic_updated_timestamp column for PostgreSQL DBs uses the TIMESTAMPZ column type
    • This cannot accept an empty string, but we used a default of an empty string when creating the column
    • The SQL schema change for postgres DBs (and probably all other DBs) should be changed to use null as the default value instead of an empty string

Acceptance criteria

  • Running check experimental on CheckUser changes does not fail at the MediaWiki install stage for either PostgreSQL or SQLite

Event Timeline

Change #1230903 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Fix SQLite schema updates during install

https://gerrit.wikimedia.org/r/1230903

Change #1230904 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Make sic_updated_timestamp addition schema change use null default

https://gerrit.wikimedia.org/r/1230904

Change #1230910 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Skip schema changes for PopulateSicUrlIdentifierTest on SQLite

https://gerrit.wikimedia.org/r/1230910

Change #1230903 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Fix SQLite schema updates during install

https://gerrit.wikimedia.org/r/1230903

Change #1230910 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Skip schema changes for PopulateSicUrlIdentifierTest on SQLite

https://gerrit.wikimedia.org/r/1230910

Change #1230904 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Make sic_updated_timestamp addition schema change use null default

https://gerrit.wikimedia.org/r/1230904