Make sure the migration scripts for CentralAuth (migratePass0.php and migratePass1.php) take the new fields into account and populate them with the right data (especially since we might be making those fields NOT NULL at some point).
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | Feature | None | T66475 Make crosswiki bits and pieces truly global (tracking) | ||
Open | Feature | None | T5525 Cross-wiki watchlists | ||
Invalid | Niharika | T149111 Update CentralAuth migration scripts to populate new lu_local_id and lu_global_id fields during migration |
Event Timeline
From my investigation into this task, I think we don't need to do anything special for migration purposes because the actual column population happens in the CentralAuthUser::attach() function. From what I found out almost all paths in maintenance/migrateAccount.php use the same function during migration.
@Tgr - does that seem correct?
@Niharika: migrateAccount.php is probably fine, but I think migratePass0.php and/or migratePass1.php might need to be updated.
I am not so sure. Neither of those scripts seem to touch the localuser table from what I can see. They seem to affect globalnames and localnames tables only.
Is there a point in touching those scripts? Wikimedia does not need them anymore, no one else is likely to do CentralAuth migrations, and CentralAuthUser would populate the fields eventually anyway.
I am not so sure. Neither of those scripts seem to touch the localuser table from what I can see. They seem to affect globalnames and localnames tables only.
@Niharika: It looks like migratePass1.php calls CentralAuthUser::storeAndMigrate(), although I'm not sure what that function does exactly. It seems like the localuser table would have to be populated at some point during the migration, but I haven't verified this.
Is there a point in touching those scripts? Wikimedia does not need them anymore, no one else is likely to do CentralAuth migrations, and CentralAuthUser would populate the fields eventually anyway.
@Tgr: If we're not going to support those scripts any more, they should be deleted and a big warning should be put at https://www.mediawiki.org/wiki/Extension:CentralAuth that there is no way to migrate an existing wikifarm to CentralAuth. Are there other devs we should ping about getting consensus to do that?
Yes, I did look into that. That function in turn calls attemptAutoMigration() which also ultimately calls the attach() function. I am pretty sure that attach() function is used in nearly every migration pathway so we need not worry about this.
Migrations would still work, nothing in CentralAuth relies on the new fields being populated, and they get auto-filled eventually anyway.
(Not saying Niharika is not right - I didn't check. But even if some migration paths do not populate the fields, it's not an issue IMO.)