0
votes

When I generate a SQL file out of my changelog file the databasechangelog table is created as a CSV file in the same folder as my generated SQL file but I want it as a table inside of my SQL file. I use liquibase 3.5.5. via command line and used this command:

 .\liquibase --url=offline:mssql? `
--changeLogFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\Changelog.xml" `
--outputFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\all.sql" `
updatesql

I did not find a command which integrates the databasechangelog table in the SQL file. It is only integrated when I use the update statement instead of updatesql but I need the SQL file.

2

2 Answers

2
votes

There is a way to include the databasechangelog table by using the outputLiquibaseSql parameter in the url

.\liquibase --url=offline:mssql?outputLiquibaseSql=true `
--changeLogFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\Changelog.xml" `
--outputFile="C:\Users\Ferid\Documents\Box Sync\PRIVATE_Ferid\liquibase-3.5.5-bin\all.sql" `
updatesql

This causes sometimes trouble with CMD or PowerShell (because of the questionmark) so it can be helpful to include it in the liquibase.properties file.

1
votes

You need to change the URL you are using to a non-offline version.