[odb-users] Database schema migration

Aarón Bueno Villares abv150ci at gmail.com
Wed Mar 15 14:36:31 EDT 2017


Quote:

If your object model consists of a large number of header files and you
generate the database schema for each of them individually, then a
changelog will be created for each of your header files. [...]

The solution to both of these problems is to generate a combined database
schema file and a single changelog. [...]

To generate the database schema, we perform a separate invocation of the
ODB compiler. This time, however, we instruct it to only generate the
schema (--generate-schema-only) and produce it combined (--at-once) for all
the files in our object model

However, ODB has a --changelog *file *option which allows to specify your
own changelog filename. Wouldn't be easier to just specify the same change
log file on each invocation of the ODB compiler over the different class
files? It removes an extra command and it's very easy to add a new ODB
option in a typical makefile (I use a ODB_FLAGS variable to my makefile).


More information about the odb-users mailing list