Handling whitespace in sql formatted changelog

Recently, we noticed some changesets landing in the databasechangelog with ID’s ‘raw’ and author ‘IncludeAll’. After investigating we noticed that white space at the top of the changelog files was the culprit. We were super happy to know that the sql applied without issue. However, is there a setting to ensure that if one were to validate the sql file it would know that the whitespace would cause this issue (or some other existing solution that would clarify any confusion on my end :smiley:)?

Team is aware and we have modified the workflow to ensure that the whitespace doesn’t make its way in again.

1 Like

Hi @S.Smith ,

Sorry for the late reply. May I inquire what version of liquibase you were using? This sounds like a bug.

No problem ronak! I believe we were using version 3.10.0, but appears to be an issue in all subsequent versions.

I’ve been wanting to learn the code base more and contribute so I actually created a PR for this issue: handle empty lines at start of formatted sql by smith-xyz · Pull Request #1713 · liquibase/liquibase · GitHub