Fixes to local DB schema generation.