I mistakenly turned this field from timestamp type in mysql to binary(14). This needs fixing but how the data can be handled?
Currently it's like this:
wikiadmin@10.64.48.109(fawiki)> select cl_timestamp from categorylinks limit 5; +---------------------+ | cl_timestamp | +---------------------+ | 2020-05-13 17:38:42 | | 2020-04-20 12:02:14 | | 2020-07-03 21:42:41 | | 2020-07-19 22:34:03 | | 2020-06-20 17:57:30 | +---------------------+ 5 rows in set (0.00 sec)
While if it turns to binary(14), the data should be like this:
wikiadmin@10.64.48.109(fawiki)> select pt_timestamp from protected_titles limit 5; +----------------+ | pt_timestamp | +----------------+ | 20080114200342 | | 20080618090959 | | 20080626174006 | | 20080627221357 | | 20080627222913 | +----------------+ 5 rows in set (0.00 sec)
I couldn't find a maintenance script to do the change and if it exists, how the migration should look like? Unfortunately I'm not 100% sure how mediawiki handles timestamps, looking at the ConvertibleTimestamp class, it seems that it can just read the value and find out the format and return the correct type, so it should be fine by just turning it a string first and then fixing the values. Has anything similar was done before?