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
When using SQL formatted changelogs, Liquibase mistakenly identifies the rollbackEndDelimiter value for endDelimiter value when rollbackEndDelimiter is defined after the endDelimiter.
The issue is that the sql formatted changelog's changeset attributes are being parsed with regular expressions and endDelimiter is a substring of rollbackEndDelimiter. This allows the regex looking for endDelimiter to actually match on the rollbackEndDelimiter definition.
Steps To Reproduce
Run the following changelog. It will throw an error because the endDelimiter is not set to the correct value
endDelimiter and rollbackEndDelimiter to be able to be dfined correctly regardless of the order in which they are specified.
Liquibase Version
4.27.0
Database Vendor & Version
No response
Liquibase Integration
No response
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
The solution is simple, the src/main/java/liquibase/parser/AbstractFormattedChangeLogParser.java file just needs modified so changeset attributes look for a word boundary immediately before the attribute name. For example:
I am having some issues with my liquibase project setup right now I am trying to figure out. I will submit a PR as soon as I get those issues figured out. But this is super small, so if one of the team wants to grab it and get this handled, I wouldn't complain about that either!
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:
Awesome, thanks @wwillard7800 ! I've narrowed my issues down to 2 previous PRs and reached out to members involved there, so I'm hoping to be able to get back to contributing before too long!
Search first
Description
When using SQL formatted changelogs, Liquibase mistakenly identifies the
rollbackEndDelimiter
value forendDelimiter
value whenrollbackEndDelimiter
is defined after theendDelimiter
.The issue is that the sql formatted changelog's changeset attributes are being parsed with regular expressions and
endDelimiter
is a substring ofrollbackEndDelimiter
. This allows the regex looking forendDelimiter
to actually match on therollbackEndDelimiter
definition.Steps To Reproduce
Run the following changelog. It will throw an error because the
endDelimiter
is not set to the correct valueExpected/Desired Behavior
endDelimiter
androllbackEndDelimiter
to be able to be dfined correctly regardless of the order in which they are specified.Liquibase Version
4.27.0
Database Vendor & Version
No response
Liquibase Integration
No response
Liquibase Extensions
No response
OS and/or Infrastructure Type/Provider
No response
Additional Context
The solution is simple, the
src/main/java/liquibase/parser/AbstractFormattedChangeLogParser.java
file just needs modified so changeset attributes look for a word boundary immediately before the attribute name. For example:becomes
In order to avoid substring matching.
I am having some issues with my liquibase project setup right now I am trying to figure out. I will submit a PR as soon as I get those issues figured out. But this is super small, so if one of the team wants to grab it and get this handled, I wouldn't complain about that either!
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: