Applies to
- Liquibase Secure (Pro)
Conditions
- Using the
execute-sqlcommand - Setting
--pro-global-strip-comments=falseparameter - Applies to multiple database platforms, including Oracle and PostgreSQL
Issue Summary
When executing SQL files containing stored procedures or functions using the execute-sql command, comments within the SQL code are stripped from the final database objects, even when the pro-global-strip-comments parameter is explicitly set to false. This occurs regardless of where the parameter is set.
Error Message
No explicit error message is displayed. The command executes successfully, but comments are silently removed from the SQL statements and the resulting database objects.
Root Cause
Prior to Liquibase Secure 5.0, the execute-sql command did not properly respect the pro-global-strip-comments parameter setting. The command stripped comments from SQL statements regardless of the parameter value, preventing users from preserving necessary documentation within their stored procedures and functions.
Resolution
For Liquibase Secure 5.0 and Later:
This issue has been resolved in Liquibase Secure 5.0 (reference: DAT-20417). Upgrade to Liquibase Secure 5.0 or later to ensure the pro-global-strip-comments parameter is properly respected when using the execute-sql command.
There are important changes for Liquibase Secure (Pro) version 5.0+. See New Distribution Channels for Liquibase Secure 5.0 for full details.
For Earlier Versions (Workaround):
If you cannot upgrade immediately, use changesets with the update command instead of execute-sql:
- Create your objects within a changeset in your changelog file
- Deploy using
liquibase updatecommand - Comments are preserved in changelog files and never stripped when using this method
Note: The execute-sql command does not record changes in the DATABASECHANGELOG table, meaning Liquibase cannot track those changes. Using changesets with the update command is the recommended approach for creating database objects as it provides change tracking and maintains a history of modifications in your repository.
Comments
0 comments
Article is closed for comments.