You can use the baseline comparison feature to validate that your CHANGEs match a baseline definition of your objects (i.e. verifying that the cumulative set of alters in your table changes correspond to some full “create table” statement as a reference).
If you provide a file w/ ends with .baseline.<extension>, this counts as the baseline file. This is only used when you run Obevo in validateBaseline mode. the maven plugin in validateBaseline mode (see the pom example below)
Two ways to run this:
BaselineValidatorMain com.gs.obevo.db.apps.baselineutil.BaselineValidatorMain class ? calculateBaselineBreaks will return a list of breaks ? validateNoBaselineBreaks is a convenience method to fail if breaks exist
<plugin> <groupId>com.goldmansachs.obevo</groupId> <artifactId>obevo-maven-plugin</artifactId> <version>${obevo.version}</version> <executions> <execution> <id>test-db-module</id> <goals> <goal>test</goal> </goals> <configuration> <env>test</env> <user>sa</user> <password>deploypass</password> <sourcePath>${basedir}/src/main/database</sourcePath> <validateBaseline>true</validateBaseline> </configuration> </execution> </executions> </plugin>
You can leverage this at build time to ensure that {+}{+}if you change your Hibernate/Reladomo/Java model files, that it will stay in sync with the changes you deploy to your DB. Nice benefit, huh?
(yes, it would be nice if the tool went a step further and figured out the alter commands for you and you never saw them. That is the holy grail…)