Options

Does Flyway support Jinja template if-else-endif syntax?

Hi,

I tried to run SQL statement for specific environment by using Jinja template if-else-endif syntax.

--
{% if '${env}' = 'stg' %}
grant test_role to test_user;
{% endif %}
--

but it failed with syntax error.

--
SQL State  : 42601
Error Code : 0
Message    : ERROR: syntax error at or near "{"
  Position: 1
Line       : 4
Statement  : {% if 'stg' = 'stg' %}
--

Does Flyway support Jinja template if-else-endif syntax?
Tagged:

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file