how to use liquibase diffChangeLog with the current changelog as reference (to generate incremental change set) -


i have existing database , have used generatechangelog command line create initial changelog. works fine :-)

but want developers use tools/processes know/use develop database , code , use script generate incremental change sets appropriate.

that is: diff against current state of developer's database (url/username/password in properties file) using current changelog (changelogfile in properties file) base reference.

there seems no easy way - best i've come is:

  1. create new temporary database.
  2. use liquibase initialise temp database (to in changelog) overriding connection url: liquibase --url=jdbc:mysql://localhost:3306/tempbase update
  3. use liquibase generate changeset in changelog diff'ing 2 databases: liquibase --referenceurl=jdbc:mysql://localhost:3306/tempbase --referenceusername=foo --referencepassword=baz diffchangelog
  4. drop temporary database.
  5. synchronise changeset: liquibase changelogsync

but there must better way...

you right liquibase cannot compare changelog file database. real option compare developer database actual liquibase-managed database, or @ least 1 temporarily created.

what suggest better way consider shifting developers author liquibase changesets in first place. different tooling may used to, has huge advantage know change wanted make 1 make way production. diff-based process (such using diffchangelog) guess right changed, not , differences not noticed until production.

liquibase has various features such formatted sql changelogs designed make transition developers working directly against database tracking changes through liquibase because once transition made many things easier.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -