I knew that {5d9b67e09ed150f342b17383e53cc0d4be1ba754}, which changed all the comment fields to `varbinary(767)`, was never deployed to WMF wikis' databases. But I mistakenly assumed that that meant the comment fields were `varbinary(255)`. In fact, several of these fields are instead `tinyblob` or `blob`.
Thanks to MySQL being dumb, that means that the attempt to add `DEFAULT ''` to these columns in {T174569} was silently ignored. When we try to stop writing the fields, the ones that aren't also nullable are going to break queries.
I have no idea which the better fix would be, changing the type and adding the default or just making them nullable. Or anything else.
Affected fields are `ar_comment`, `img_description`, `ipb_reason`, `oi_description`, and `rev_comment`. Fortunately `rev_comment` is only affected on a few wikis, but `img_description` is on many including Commons.
Fields and wikis are {P6683}
ALTERs to run:
```
ALTER TABLE archive MODIFY COLUMN ar_comment varbinary(255) NOT NULL DEFAULT '';
ALTER TABLE ipblocks MODIFY COLUMN ipb_reason varbinary(255) NOT NULL DEFAULT '';
ALTER TABLE oldimage MODIFY COLUMN oi_description varbinary(255) NOT NULL DEFAULT '';
ALTER TABLE revision MODIFY COLUMN rev_comment varbinary(255) NOT NULL DEFAULT '';
ALTER TABLE image MODIFY COLUMN img_description varbinary(255) NOT NULL DEFAULT '', ADD COLUMN img_description_id bigint unsigned NOT NULL DEFAULT 0 AFTER img_description, ALTER COLUMN img_user_text SET DEFAULT '', ADD COLUMN img_actor bigint unsigned NOT NULL DEFAULT 0 AFTER img_user_text;
CREATE INDEX img_actor_timestamp ON image (img_actor, img_timestamp);
```
* Progress for the affected wikis split by shard:
** s1
*** [x] codfw
*** [x] eqiad progress: T187089#4104575 UPDATE: eqiad only the master pending - will be done once we have done the DC failover - done as db1052 was failed over (T197069)
** s2
*** [x] codfw
*** [x] eqiad progress: T187089#3985090 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
** s3
*** [x] codfw
*** [x] eqiad progress: T187089#4096779 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
** s4
*** [x] codfw
*** [x] eqiad progress: T187089#4034294 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
** s5
*** [x] codfw progress: T187089#3966228
*** [x] eqiad progress: T187089#3966228 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
** s6
*** [x] codfw
*** [x] eqiad progress: T187089#3977745 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
** s7
*** [x] codfw
*** [] eqiad progress: T187089#4023553 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
** s8
*** [x] codfw
*** [x] eqiad progress: T187089#4123193 UPDATE: eqiad only the master pending - will be done once we have done the DC failover
[] wikitech
** [x] labswiki
** [x] labtestwiki