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

Re : Using Liquibase Java API to generate SQL file from ChangeLog

$
0
0
If you are using the command line, you wouldn't have to worry about the writer parameter is. That is just if you are using the java API directly.

Yes, if you run updateSQL it runs liquibase update like it would have done against your given database with the passed changelog.  You need the changelog file for updateSQL because it needs to know what changesets to try to run.

If you have liquibase changesets for your whole database already, running updateSQL against a blank database will give the SQL to fully create the database. If you have an existing database that you want changeSets and/or SQL generated for, the generateChangeLog command will get you a changelog file that would match the current database (just a single user and schema, though). You can then run that through updateSQL to get the creation SQL.

Nathan

Viewing all articles
Browse latest Browse all 2993

Trending Articles



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