Class SchemaBaselineDumper
java.lang.Object
ubic.gemma.core.util.test.SchemaBaselineDumper
One-off Flyway baseline generator. Boots Hibernate the same way
BaseDatabaseTest5 does
(H2 in MODE=MYSQL, native bootstrap from hibernate.cfg.xml, gsec mappings) and
writes the CREATE DDL to a target file via Hibernate's standard
jakarta.persistence.schema-generation.scripts.* properties.
The dump is taken from the in-memory metadata Hibernate would otherwise execute against the
database during hbm2ddl.auto=create; we additionally point a live H2 datasource at the
same SessionFactory so HB does not try to introspect a non-existent database.
Run from the gemma-core directory:
mvn -q test-compile
mvn -q exec:java -Dexec.mainClass=ubic.gemma.core.util.test.SchemaBaselineDumper \
-Dexec.classpathScope=test
Output defaults to src/main/resources/db/migration/h2/V1__hibernate_baseline.sql.-
Method Summary
-
Method Details
-
main
-