In poking at the code for supporting wikivoyage, it looks to me that the site_identifiers table is populated incorrectly for non-wikipedias.

For wikipedia sites, it has interwiki keys such as 'en'. For wikivoyage, it is 'enwikivoyage'.  These are used to construct interwiki links and 'enwikivoyage:Berlin' is not valid.  Thus it's problematic to use the sites code for interwiki links.

Is there a good reason for populating the table in this way?

I think the table should have si_key = 'en' for English Wikivoyage.  That means a database rows for enwiki and enwikivoyage would be: 

4977 | interwiki  | en            |
4984 | interwiki  | en  |

****but**** the table defines a si_type and si_key as a unique key, so this does not work currently.

UNIQUE KEY `site_ids_type` (`si_type`,`si_key`),

Any insights on why things are the way they are?

Cheers,
Katie


-- 
Katie Filbert
Wikidata Developer

Wikimedia Germany e.V. | NEW: Obentrautstr. 72 | 10963 Berlin
Phone (030) 219 158 26-0

http://wikimedia.de

Wikimedia Germany - Society for the Promotion of free knowledge eV Entered in the register of Amtsgericht Berlin-Charlottenburg under the number 23 855 as recognized as charitable by the Inland Revenue for corporations I Berlin, tax number 27/681/51985.