When i use the updateSQL goal to creat the sql statements, i do not want liquibase to add the insert into databasechangelog statements, Is there a way i can go that.
When i use the updateSQL goal to creat the sql statements, i do not want liquibase to add the insert into databasechangelog statements, Is there a way i can go that.
There is no way currently outside creating an extension to override the MarkChangeSetRanGenerator class.
Nathan
Hi,
I’ve just wanted to post the question but found this one, which is not so old. I’m in need for this functionality and have been for quite a time. I’m using it for making the SQL diff for minor version upgrade of our software where I only update the necessary tables as needed. It would be great if there were some new command like updateSqlRaw which will only ouptut the real SQL changes without the one for databasechangelog.
I would do it myself but I’m not a Java developer nor do I know the internals of liquibase. But I’ll gladly donate the implementation of this feature.
Thank You
Trigve
I just created https://github.com/liquibase/liquibase-nochangelogupdate which is an extension to suppress inserting into the databasechangelog table.
Let me know how it works for you.
Nathan
Thanks for reply and extension,
unfortunately it looks like it is still ouputting the databasechangelock changes. I’m using the updateSql, this is my command I use inside my batch files (also with some variables which you could ignore):
I think I see the problem. I had added a liquibase.ext.nochangelogupdate.enabled property to control enabling the extension but then was not handling the case where no property was specified (it was defaulting to not enabled).
I pushed out a 1.1 release that should fix the problem.
Nathan
Thanks for looking it. I don’t want to sound rude but do you have the build (.jar) of the new version by any chance? Because I don’t have environment set up for building liquibase and plugins.
Thank You
Trigve
Hmm I see there .jar for version 1.0 only. And using diff there isn’t any difference to the previous one. Or did I miss something?
Thank You
Trigve
Thanks for the .jar upload. It worked but I’ve got the problem with this system property:
After the testing and tweaking my scripts it looks like all is working fine.
Can I somehow support the project through paypal?
Thanks a lot!
Trigve
https://github.com/liquibase/liquibase-nochangelogupdate/releases/tag/liquibase-nochangelogupdate-1.1 is the 1.1. release. It should be on the releases page, although it looks like I had forgot to attach the .jar file (still getting used to the github release process).
Nathan
Through the command line you need to specify -Dliquibase.ext.nochangelogupdate.enabled=[true|false] as a java param.
Looking at liquibase.bat, it looks like it is not respecting the JAVA_OPTS environment variable like it should. I put in a fix for 3.0.6, but locally you can change the “set JAVA_OPTS=” line to “IF NOT DEFINED JAVA_OPTS set JAVA_OPTS=” and then set the JAVA_OPTS environment variable before running liquibase.
Nathan
Good to hear it’s working for you.
If you’d like to donate, there is a link on the sourceforge page http://sourceforge.net/projects/liquibase/
Donations of any type are always very appreciated.
Nathan