Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

placeholderReplacement=false not working #1279

Closed
indianscout opened this issue Apr 13, 2016 · 1 comment
Closed

placeholderReplacement=false not working #1279

indianscout opened this issue Apr 13, 2016 · 1 comment

Comments

@indianscout
Copy link

What version of Flyway are you using?

https://repo1.maven.org/maven2/org/flywaydb/flyway-commandline/4.0/flyway-commandline-4.0-linux-x64.tar.gz

What database are you using (type & version)?

Postgres 9.5

What operating system are you using?

Ubuntu Linux 15.10

What did you do?

(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
Run a Migration with placeholderReplacement=false:

flyway.placeholderReplacement=false

A migration script contains a PLV8 function with a comment containing the following sequence:

indianscout@indianscout45:~/infektweb/guidelines.v4$ grep -A 10 -B10 "\${ user" dbdata/sql/V00_00113__CreateContentMigrationFunctionsDetails.sql 
...
     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
     * compiled({ 'users': ['fred', 'barney'] });
     * // => '<li>fred</li><li>barney</li>'
     *
     * // Use the internal `print` function in "evaluate" delimiters.
     * var compiled = _.template('<% print("hello " + user); %>!');
     * compiled({ 'user': 'barney' });
     * // => 'hello barney!'
     *
     * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
     * var compiled = _.template('hello ${ user }!');
     * compiled({ 'user': 'pebbles' });
     * // => 'hello pebbles!'
     *
     * // Use custom template delimiters.
     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
     * var compiled = _.template('hello {{ user }}!');
     * compiled({ 'user': 'mustache' });
     * // => 'hello mustache!'
     *
     * // Use backslashes to treat delimiters as plain text.
...

The line:

     * var compiled = _.template('hello ${ user }!');

is causing the following error although placeholderReplacement is set to false:

...
Migrating schema "public" to version 00.00113 - CreateContentMigrationFunctionsDetails
ERROR: Migration of schema "public" to version 00.00113 - CreateContentMigrationFunctionsDetails failed! Changes successfully rolled back.
ERROR: No value provided for placeholder expressions: ${ user }.  Check your configuration!
What did you expect to see?

When setting explicitly setting placeholderReplacement to false there should no be any error like this.

What did you see instead?
...
Migrating schema "public" to version 00.00113 - CreateContentMigrationFunctionsDetails
ERROR: Migration of schema "public" to version 00.00113 - CreateContentMigrationFunctionsDetails failed! Changes successfully rolled back.
ERROR: No value provided for placeholder expressions: ${ user }.  Check your configuration!
@axelfontaine
Copy link
Contributor

Duplicate of #1233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants