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

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

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