Similar to Wikibase, we should probably have proper handling for imports (from another wiki or from XML files), otherwise imported Schemas might have conflicting IDs. Also the entity id assigning would need to be updated after each import in order not to run into already existing Schema IDs (AFAIR wikibase currently doesn't handle that).
For Wikibase this currently means that there is a setting allowEntityImport (defaulting to false) which toggles whether it's possible to import into the Wikibase namespace.