Devskiller / jpa2ddl

JPA Schema Generator Plugin
Apache License 2.0
110 stars 33 forks source link

Support generating schema difference #2

Closed jkubrynski closed 6 years ago

jkubrynski commented 6 years ago

It would be nice to be able to generate alter statements to update schema from the previous version (based on sql file) to current one (based on the jpa mappings)

jkubrynski commented 6 years ago

The idea is to support Flyway approach, We'll generate two things:

  1. Flat model stored for example in the sql/flat/database.sql
  2. Updates stored in sql/changesets/ directory with names based on Flyway convention: V1_init.sql, V2_somename, etc. Probably somename as it should be generated will be commit id, date, or the project version