Addshore expansion

This adds everything necessary for https://www.mediawiki.org/wiki/Extension:Wikibase_QueryEngine/SQL_schema_proposal