https://drift-tracker.toolforge.org/report/core/ shows a schema drift for:
- Mismatching field type of user.user_email_authenticated
- Mismatching field type of user.user_email_token
- Mismatching field type of user.user_email_token_expires
- Mismatching field type of user.user_newpass_time
- Mismatching field type of user.user_touched
- Mismatching field type of user.user_token
- Mismatching field type of user.user_registration
on s1, s2, s3, s4, s7
- Mismatching field nullability of user.user_email
- Mismatching field type of user.user_newpassword
- Mismatching field nullability of user.user_newpassword
- Mismatching field type of user.user_password
- Mismatching field nullability of user.user_password
on s3, s7
- Mismatching field type of user.user_email
on s3, s6, s7
root@db1112.eqiad.wmnet[thwikiquote]> show create table user\G *************************** 1. row *************************** Table: user Create Table: CREATE TABLE `user` ( `user_id` int(5) unsigned NOT NULL AUTO_INCREMENT, `user_name` varbinary(255) NOT NULL DEFAULT '', `user_real_name` varbinary(255) NOT NULL DEFAULT '', `user_password` varbinary(255) DEFAULT NULL, `user_newpassword` varbinary(255) DEFAULT NULL, `user_email` varbinary(255) DEFAULT NULL, `user_touched` varbinary(14) NOT NULL, `user_token` varbinary(32) NOT NULL DEFAULT '', `user_email_authenticated` varbinary(14) DEFAULT NULL, `user_email_token` varbinary(32) DEFAULT NULL, `user_email_token_expires` varbinary(14) DEFAULT NULL, `user_registration` varbinary(14) DEFAULT NULL, `user_newpass_time` varbinary(14) DEFAULT NULL, `user_editcount` int(11) DEFAULT NULL, `user_password_expires` varbinary(14) DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `user_name` (`user_name`), KEY `user_email_token` (`user_email_token`), KEY `user_email` (`user_email`(50)) ) ENGINE=InnoDB AUTO_INCREMENT=5135 DEFAULT CHARSET=binary 1 row in set (0.001 sec)
The code has the following definition for the three columns:
user_email_authenticated BINARY(14) DEFAULT NULL, user_email_token BINARY(32) DEFAULT NULL, user_email_token_expires BINARY(14) DEFAULT NULL,
Addition in 77c833c4e69c01656e35ac940aa1d71b2a3690ba
Then char() binary rewrite to binary() in f38344aba87edbdb5dba23d6433bf3c7cbbb0b51
DEFAULT NULL added in 88bfadf5eddfb80b9cf189fa71e79bb16adff847
But production is using varbinary instead of binary (T42626)
user_newpass_time BINARY(14) DEFAULT NULL,
Addition in e9de4983bfbf4ad8cd13444633731e32997fa169#change-pVGjpnYAcwz0
Then char() binary rewrite to binary() in f38344aba87edbdb5dba23d6433bf3c7cbbb0b51
DEFAULT NULL added in 88bfadf5eddfb80b9cf189fa71e79bb16adff847
But production is using varbinary instead of binary (T42626)
user_touched BINARY(14) NOT NULL,
Addition in 77c833c4e69c01656e35ac940aa1d71b2a3690ba
Then char() binary rewrite to binary() in f38344aba87edbdb5dba23d6433bf3c7cbbb0b51
Default removed in c697406d3f67fa9cd90fad14cdd4dbf680daa4d8
But production is using varbinary instead of binary (T42626)
user_token BINARY(32) DEFAULT '' NOT NULL,
Addition in 72e66de074fe8be9250320012ce4d9abd5850471
Then char() binary rewrite to binary() in f38344aba87edbdb5dba23d6433bf3c7cbbb0b51
But production is using varbinary instead of binary
user_registration BINARY(14) DEFAULT NULL,
Addition in a35fcb0bed5f8600b4330039b6772fa4c7a49cd0
Then char() binary rewrite to binary() in f38344aba87edbdb5dba23d6433bf3c7cbbb0b51
Default removed in c697406d3f67fa9cd90fad14cdd4dbf680daa4d8
But production is using varbinary instead of binary (T42626)
CREATE TABLE /*_*/user ( ... user_password TINYBLOB NOT NULL, user_newpassword TINYBLOB NOT NULL, user_email TINYTEXT NOT NULL,
Addition in d82c14fb4fbac288b42ca5918b0a72f33ecb1e69#change-pVGjpnYAcwz0
Default removed in 241fadbc29c95795cf7c7bb37ddd55539a1cc412
But production is using varbinary NULL instead of tinyblob NOT NULL
Please check production definition and adjust the columns
If the definition of production are better for big wikis, feel free to abandon and request code change with a new task (This task could be reused to apply the newest schema)
There is no ready ALTER statement in the commit history.
ALTER TABLE /*_*/user CHANGE user_email_authenticated user_email_authenticated BINARY(14) DEFAULT NULL, CHANGE user_email_token user_email_token BINARY(32) DEFAULT NULL, CHANGE user_email_token_expires user_email_token_expires BINARY(14) DEFAULT NULL, CHANGE user_newpass_time user_newpass_time BINARY(14) DEFAULT NULL, CHANGE user_touched user_touched BINARY(14) NOT NULL, CHANGE user_token user_token BINARY(32) DEFAULT '' NOT NULL, CHANGE user_registration user_registration BINARY(14) DEFAULT NULL;
- ALTERs to run: see above
- Where to run those changes: s1, s2, s4 - list of wikis needs to be created
- When to run those changes: any time
- If the schema change is backwards compatible: Yes
- If the schema change has been tested already on some of the test/beta wikis: beta cluster is running with the new schema
- if the data should be made available on the labs replicas and/or dumps: no change of the existing rules
Progress
- s1
- s2
- s4
ALTER TABLE /*_*/user CHANGE user_email_authenticated user_email_authenticated BINARY(14) DEFAULT NULL, CHANGE user_email_token user_email_token BINARY(32) DEFAULT NULL, CHANGE user_email_token_expires user_email_token_expires BINARY(14) DEFAULT NULL, CHANGE user_newpass_time user_newpass_time BINARY(14) DEFAULT NULL, CHANGE user_touched user_touched BINARY(14) NOT NULL, CHANGE user_token user_token BINARY(32) DEFAULT '' NOT NULL, CHANGE user_registration user_registration BINARY(14) DEFAULT NULL, CHANGE user_password user_password TINYBLOB NOT NULL, CHANGE user_newpassword user_newpassword TINYBLOB NOT NULL, CHANGE user_email user_email TINYTEXT NOT NULL;
- ALTERs to run: see above
- Where to run those changes: s3, s7 - list of wikis needs to be created
- When to run those changes: any time
- If the schema change is backwards compatible: Yes
- If the schema change has been tested already on some of the test/beta wikis: beta cluster is running with the new schema
- if the data should be made available on the labs replicas and/or dumps: no change of the existing rules
Progress
- s3
- s7
ALTER TABLE /*_*/user CHANGE user_email user_email TINYTEXT NOT NULL;
- ALTERs to run: see above
- Where to run those changes: s6 - list of wikis needs to be created
- When to run those changes: any time
- If the schema change is backwards compatible: Yes
- If the schema change has been tested already on some of the test/beta wikis: beta cluster is running with the new schema
- if the data should be made available on the labs replicas and/or dumps: no change of the existing rules
Progress
- s6