You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A sql view with block comments containing
-- Comments :
had run successfully in Liquibase 4.3.5. We are trying to migrate to new version of Liquibase 4.25.1. We are getting the error
liquibase.exception.SetupException: Unexpected formatting in formatted changelog '<FILE_NAME_REMOVED>sql' at line 16. Formatted SQL changelogs require known formats, such as '--comment ' and others to be recognized and run. Learn all the options at https://docs.liquibase.com/concepts/changelogs/sql-format.html at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:756) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:508) at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:390) at
Steps To Reproduce
Input file:
--liquibase formatted sql
--never change the value of author:changsetid
--changeset views:VW_DIM stripComments:false runOnChange:true
--Database.ANALYTICS.VW_DIM source
CREATE
OR REPLACE VIEW VW_DIM
/*******************************************************************
-- View name: VW_DIM
-- Layer : Analytics
-- Owner :
-- Version :
-- Created by :
-- Created on :
-- Reviewed by :
-- Purpose :
-- Comments :
-- JIRA story/incident link :
-- Revision history :
Sl No. Date Author Changelog
--
Run this against liquibase validate and it fails
Expected/Desired Behavior
Validation should have passed
Liquibase Version
4.25.1
Database Vendor & Version
snowflake
Liquibase Integration
CLI
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
Looks like this issue or a variation of this issue was fixed in earlier version as reported in #3017
Probably fixed for --comment but not for -- Comments :
Thanks anyway for the good tool which makes our life easier
Are you willing to submit a PR?
I'm willing to submit a PR (Thank you!)
The text was updated successfully, but these errors were encountered:
This is a weird one - I used the changelog you provided and tested some variations, and it only happens when using exactly -- Comments :.
Here are other similar expressions that I tested and did not fail:
--Comments: (no space before the colon)
-- Comment :
-- Commentaaaa : (any string afterwards)
-- Comments (no colon)
It's clearly some edge case that wasn't covered in the code.
The good news is that you can easily work around it by using any of the variations on the list above.
If you want, you could create a PR and propose a fix for this! Our dev team will be available if you need any guidance.
Good Morning,
Thanks for your analysis and workaround solution. We will try to modify the comments and try to run and report back if it success or not.
If time permits, I will try to create a PR.
Search first
Description
A sql view with block comments containing
-- Comments :
had run successfully in Liquibase 4.3.5. We are trying to migrate to new version of Liquibase 4.25.1. We are getting the error
liquibase.exception.SetupException: Unexpected formatting in formatted changelog '<FILE_NAME_REMOVED>sql' at line 16. Formatted SQL changelogs require known formats, such as '--comment ' and others to be recognized and run. Learn all the options at https://docs.liquibase.com/concepts/changelogs/sql-format.html at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:756) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:508) at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:390) at
Steps To Reproduce
Input file:
--liquibase formatted sql
--never change the value of author:changsetid
--changeset views:VW_DIM stripComments:false runOnChange:true
--Database.ANALYTICS.VW_DIM source
CREATE
OR REPLACE VIEW VW_DIM
/*******************************************************************
-- View name: VW_DIM
-- Layer : Analytics
-- Owner :
-- Version :
-- Created by :
-- Created on :
-- Reviewed by :
-- Purpose :
-- Comments :
-- JIRA story/incident link :
-- Revision history :
Sl No. Date Author Changelog
*******************************************************************/
AS(
--
Run this against liquibase validate and it fails
Expected/Desired Behavior
Validation should have passed
Liquibase Version
4.25.1
Database Vendor & Version
snowflake
Liquibase Integration
CLI
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
Looks like this issue or a variation of this issue was fixed in earlier version as reported in
#3017
Probably fixed for --comment but not for -- Comments :
Thanks anyway for the good tool which makes our life easier
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: