| jcrespo added a comment. |
So the comments:
- do not defer the creation of the indexes- those are extra alter tables and do no make things easier in any way- just create the indexes from the start- assuming they will be used.
- Renaming columns is a big no- specially to an already existent name. Always add a new column and stop using the previous one at some point. We then can drop the old one with a lower precedence. Think not only as a bad practice in general with code- some applications that are not mediawiki, like labs, may break in bad ways.
So my suggestion would be:
- Create a new column with new indexes
- Populate new column at the same time than the current one (ideally with code, but if you do not want to touch code, it can even be made with a trigger) + populate old values with maintenance
- Deploy the new code using only the new column
- At some point in the future, drop the old column (it can be made all null and it will save space already) -low priority
If you are changing an int for a string in a trivial way, that mysql would be compatible with (1234 -> '1234'), it could even be done in a single blow, but I assume it is not the case, probably something more on the lines of 1234 -> 'Q1234', am I right?
This simplifies the process, and less schema changes is not only less work for us- it is also you getting less blocked by us.
This is not an absolute thing- I am open to criticism, as you may know more details that I don't. It is ok to keep ids like term_entity_id_s, reusing identifiers is a bit frowned upon.
TASK DETAIL
EMAIL PREFERENCES
To: jcrespo
Cc: jcrespo, Marostegui, Lydia_Pintscher, Aklapper, daniel, WMDE-leszek, Minhnv-2809, D3r1ck01, Izno, Luke081515, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair
Cc: jcrespo, Marostegui, Lydia_Pintscher, Aklapper, daniel, WMDE-leszek, Minhnv-2809, D3r1ck01, Izno, Luke081515, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
