Page MenuHomePhabricator

Change varchar columns into varbinary
Closed, ResolvedPublic

Description

During CR for T231170/T231172, I noticed in global_block_whitelist that two columns are varchar not varbinary

CREATE TABLE /*_*/global_block_whitelist (
	gbw_id int(11) NOT NULL PRIMARY KEY, -- Key to gb_id in globalblocks database.
	gbw_address varbinary(255) NOT NULL,
	gbw_by int(11) NOT NULL, -- Key to user_id
	gbw_by_text varchar(255) NOT NULL,
	gbw_reason varchar(255) NOT NULL,
	gbw_expiry binary(14) NOT NULL
) /*$wgDBTableOptions*/;

We should fix and normalise this, and then the DBAs can fix this with less work in T231172

We can change gbw_reason in T231170 to make it easier, and then just do gbw_by_text on a separate patch

Event Timeline

Reedy created this task.Aug 25 2019, 8:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 25 2019, 8:03 PM
Reedy moved this task from Unsorted to Change on the Schema-change board.
Reedy updated the task description. (Show Details)Aug 25 2019, 8:07 PM

Change 532265 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GlobalBlocking@master] Switch global blocking tables to use varbinary(767) for reason

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

Change 532270 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GlobalBlocking@master] Convert gbw_by_text column to varbinary

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

DannyS712 added a subscriber: DannyS712.

gbw_reason patched in T231170, gbw_by_text patched in https://gerrit.wikimedia.org/r/532270

Restricted Application added a project: User-DannyS712. · View Herald TranscriptAug 25 2019, 8:23 PM

Change 532265 merged by jenkins-bot:
[mediawiki/extensions/GlobalBlocking@master] Switch global blocking tables to use varbinary(767) for reason

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

Change 532271 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/extensions/GlobalBlocking@master] Convert gbw_by_text column to varbinary

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

Change 532270 abandoned by DannyS712:
Convert gbw_by_text column to varbinary

Reason:
See I296b1d4b5611375aa7cbd1e9f509b82b392e27e3

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

Change 532271 merged by jenkins-bot:
[mediawiki/extensions/GlobalBlocking@master] Convert gbw_by_text column to varbinary

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

Reedy closed this task as Resolved.Aug 25 2019, 8:46 PM
DannyS712 moved this task from Unsorted to Merged on the User-DannyS712 board.Sep 24 2019, 5:38 AM