updateSql generates SQL with unexpected linefeeds, breaks SQLPlus

Hi -

We have successfully adopted Liquibase in dev & UAT for a few months now, and are very happy with it.  We are now testing our first production migration.  This is through the updateSql route, to generate a SQL file for the DBAs to review.

The generated SQL has several instances of unexpected linefeeds, which cause our command-line DB tool (Oracle SQLPlus) to fail.

One source is the DATABASECHANGELOG.COMMENTS, which are generated by Liquibase:

  1. INSERT INTO XXX.DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, LIQUIBASE) VALUES (‘X’, ‘X’, ‘X’, SYSTIMESTAMP, 1, ‘XYZ’, ‘The ‘‘sqlFile’’ tag allows you to specify any sql statements and have it stored external in a file. It is useful for complex changes that are not supported through LiquiBase’‘s automated refactoring tags such as stored procedures.[LF]
    The sqlFile refact…’, ‘’, ‘MARK_RAN’, ‘3.0.4’);[CR][LF]

I’m running Liquibase 3.0.4 on Windows, but but running it on Linux generates the same multi-line comments.  SQLPlus is running on Linux.

I plan to use find/replace to resolve it, but that’s not how we wanted to use the tool.

I’ll take a look. I created https://liquibase.jira.com/browse/CORE-1601 to track the issue.