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.
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.
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.
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.
Thanks for the .jar upload. It worked but I’ve got the problem with this system property:
liquibase.ext.nochangelogupdate.enabled
Because it is system property I don’t know how to set it (as command line argument) to affect only some instances of liquibase. Because what I found on the net, the one possibility is to use -DXXX=value as “java” command line argument and when I set it in liquibase.bat it affects all instances of course. But I need to selectively turn it off/on in my workflow. So could I somehow set the system parameter through the liquibase command options? Or through some environment variables? Becuase AFAIK the liquibase’s “-D” param option is only local to liquibase.
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.