This is related to T28994 (bug 26994) where Brion says:
If the mapping of '''site key name''' <-> '''database name''' can be
abstracted, this at least some of that may become easier.
This is related to T28994 (bug 26994) where Brion says:
If the mapping of '''site key name''' <-> '''database name''' can be
abstracted, this at least some of that may become easier.
For comparison, here's how we do it in StatusNet:
So to handle the Wikimedia-style cases, a central site mapping table might list for each row at *minimum*:
If we're actually using a mapping table instead of trying to manually break apart or build up from prefix/suffixes all the time, that might actually be plenty.
That would allow continuing to use the dbname as an internal key, while allowing language codes or domains to be altered.
However, in places where we expose db names (such as cross-wiki user management), we should consider displaying and selecting from canonical hostnames ('en.wikipedia.org') or language+family ('en.wikipedia') as a UI-friendly form, so that things that look like they don't match are no longer an issue.
This sounds a lot like Toolserver's wiki database. Which is one of the reasons cross-wiki tools are relatively easy to make there.
A wikified dump of that MySQL table can be seen here:
https://wiki.toolserver.org/view/Wiki_server_assignments