1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38# Spring sample - schema versioning It seems you shouldn't use `hibernate.hbm2ddl.auto: update` to handle your schema migrations (see http://stackoverflow.com/questions/221379/hibernate-hbm2ddl-auto-update-in-production). Yet this feature is **really** handy in development. Soooo, your (main) options are: - [Liquibase](http://www.liquibase.org/) - [Flyway](https://flywaydb.org/) - ... - this repository? :innocent: ##ย How to `docker-compose up -d` will create a MariaDB container `mvn test` will run the unit tests, which will *miserably* fail if your schema (located in /src/main/resources/sql) do not match your @Entity mappings **BUT** Hibernate will kindly tell you what script to run to solve them :heart_eyes: ## Structure โโโ src/main/java โ โโโ AbstractEntity.java โ โโโ Project.java โ โโโ Task.java โโโ src/main/resources โ โโโ schema_v0_to_v1.sql โ โโโ schema_v0.sql โ โโโ schema_v1_to_v2.sql โ โโโ schema_v1.sql โ โโโ schema_v2.sql โโโ src/test/java โ โโโ ConfigTest.java โ โโโ DatabaseTest.java โโโ docker-compose.yml โโโ pom.xml