Comments
2 comments
-
Jinja template is Python based tool https://jinja.palletsprojects.com/en/3.1.x/
Flyway is a Java based tool.
so I guess Flyway does not support Jinja but I am OK if Flyway support some template engine and if-else-endif syntax.
-
Hi yohei,
Thanks for the question!
Flyway supports both Script migrations and SQL Migrations and from your phrasing it sounds like you're trying to blend those together into a single file.
Please see https://documentation.red-gate.com/fd/migrations-184127470.html under for mroe detail on Script migrations. You said Jinja is python based and flyway does support .py file, so there may be a happy medium for what you need.
I'd expect that you could have branching logic in your script that then invoked the desired behaviour using this format.
Add comment
Please sign in to leave a comment.
I tried to run SQL statement for specific environment by using Jinja template if-else-endif syntax.
--
but it failed with syntax error.
--
SQL State : 42601
Does Flyway support Jinja template if-else-endif syntax?