I have a requirement to retain Oracle SQL comments made inside my Liquibase sql formatted changelogs. Thus I have the following attribute set stripComments:false
Such comments in my SQL formatted changelogs are typically supplied using the standard -- (hyphen hyphen) characters
-- DROP LINK
However, it appears that with Liquibase attempts to execute all comments, and in this example, the comment above. This causes my Liquibase update to fail with the following error:
Invalid SQL type: sqlKind = UNINITIALIZED
I have tried to replcae all occurances of -- comment
with /* comment */
but this also generates the same error.
Anyone have any ideas?
You can check out
StringUtils
'sstripComments()
method for how liquibase identifies comments in your SQL.There are regex patterns defined for this:
"\\s*\\-\\-.*\\n"
"\\s*\\-\\-.*$"
"/\\*.*?\\*/"
You could take those patterns and put it in some online regex page (e.g. https://regex101.com/) along with your SQLs and see where it goes wrong.