Use the generateChangeLog command to generate your initial change log.
Here the link for the ant task version http://www.liquibase.org/manual/generatechangelog_ant_task
Use the generateChangeLog command to generate your initial change log.
Here the link for the ant task version http://www.liquibase.org/manual/generatechangelog_ant_task
How can I use the liquidbase with the existing database?
I have go through the quickstart guide and install the liquidbase, but
I am not sure how can I create changeset from the existing databse.
Probably one of IDEs will generate the file but I can’t find the stand alone IDE
which I saw on the training video.
If there is a documentation about this, I think more people will start using liquidbase.
I have generated the changelog and now what? I suppose I shouldn’t “update” since I do have all the changes already in the database. How do I make Liquibase record the changes in database log table alone?
Now you maintain your database thru a succession of change sets saved as XML. You define the change sets with whatever database changes you need to make to your database. Then after saving any new change sets, then you run the ‘update’ to apply that change to your database.
The changes/updates are logged in the database log table during the update process and that is what prevents you from applying the same change set multiple times to the same database.
Each database mod can/should go in a separate file and then those are included into the full set of changes to keep track of the history of changes, just like you’d do in a source code repository for source code.
Yes, that I understand. Thank you, Mike. But I can’t get my head around on how do I mark (in DATABASECHANGELOG table) the reverse engineered changes generated by command.
If I understand you correct, I don’t think you want to mark ‘reversed engineered changes’ differently. You need to have a starting point with which to support changes to your database - so think of the initial change set generated from the generateChangeLog as your ‘initial source commit’ to the repository. Everything is built off of that going forward.
If I have this correct, then you can create a new instance of a database using the update command and using the generated statements. Changes are, the initial change set generated has a single id in the database change log. You can also ‘tag’ the database as your initial copy too.