Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : Copy database schema created by liquibase into another database by java code

$
0
0
OK, I understand. If I was an architect on your project I would suggest that could be a bad design decision, but there is obviously I don't know about your application and why you are doing that. 

Assuming you are committed to that, then here are a couple of ways you might solve it. 

1. Use the same 'real time schema modification' step you use on A to also modify B. 
2. Use the Liquibase diffChangeLog functionality to compare database A to database B and create a changelog that only has the changes between A and B, then use Liquibase update to apply the changes to B. With this technique you would need to embed Liquibase in your application (if you haven't already done that) and then add some methods to your code to call Liquibase. 

Steve Donie
Principal Software Engineer
Liquibase Community Engagement
Datical, Inc. http://www.datical.com/

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>