db schema generation fixes