Modify generated output file when using update(Contexts contexts, Writer output)

What sort of changes are you looking to make? 

It looks like the Liquibase.outputHeader() method is private currently but could be made protected so a subclass of liquibase.Liquibase could override it. Or are you looking to do more changes than just the header?


Customization is one of the major features I’m aiming for, but it may help to have a little more information on what you are looking for. Currently there is the header that is generated by the liquibase.Liquibase class, but then the rest is handled by the Executor just saving what would have executed out to the file. 

If you had more details on the kinds of changes and what would make it simpler. Maybe an example output.

I’ll be on vacation all next week so I will probably not reply until a week from Monday.



I am wondering on how to change the generated script when using update method with Writer.

For example, I have the following header:

– *********************************************************************

– Update Database Script

– *********************************************************************

or even another generated comments?

– Initialize Database Lock Table;

– Lock Database;

– Changeset d:/liquibase-scripts/changelog.xml::2::prates;

Is it possible to change by overriding some class? I checked the Executor, LockService, but it seems to be spread in various classes.

Thank you in advance!

Sorry, I wasn’t logged on.

Not just change to protected, but maybe center all stuff about script generation (from separators to content displayed, order, tabs), so it could be just extended and customizable the way you want. 

Initially I want to make it available for my DBA`s, so I would like to display in a simpler and specific way.

I am using v3.0.8, maybe I will need to change the generated scripts directly, or is there any alternative for this?

Thank you in advance!