+ if ( !in_array( $domain->getSchema(), [ null, 'mediawiki', 'dbo' ], true ) ) {
+ // Include the schema if it is set and is not the default placeholder.
+ // This means a site admin may have specifically taylored the schemas.
+ // Domain IDs might use the form <DB>-<project>-<language>, meaning that
+ // the schema portion must be accounted for to disambiguate wikis.
+ return "{$domain->getDatabase()}-{$domain->getSchema()}-{$domain->getTablePrefix()}";
+ }
+
+ // Note that if this wiki ID is passed a a domain ID to LoadBalancer, then it can
+ // handle the schema by assuming the generic "mediawiki" schema if needed.