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

Multiple procedures each terminated with "/" in placeholder string fails to create procedures #2613

Closed
jaa2261 opened this issue Dec 27, 2019 · 1 comment

Comments

@jaa2261
Copy link

@jaa2261 jaa2261 commented Dec 27, 2019

Which version and edition of Flyway are you using?

6.1.3

If this is not the latest version, can you reproduce the issue with the latest one as well?

(Many bugs are fixed in newer releases and upgrading will often resolve the issue)

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Gradle plugin

Which database are you using (type & version)?

Oracle 19.3

Which operating system are you using?

Linux

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
We have multiple files containing procedure definitions which are combined into a single placeholder:

placeholders = [
'procedures_DDL': fileTree(dir: "${projectDir}/src/main/sql/Procedures").include('*.sql').collect{it.getText()}.join(System.getProperty("line.separator"))
]

Each file is terminated with a "/"

The migration file just contains

${procedures_DDL}

What did you expect to see?

Expected each procedure to be created. This works fine in 5.0.7

What did you see instead?

A single procedure is created containing the combined text -

create or replace PROCEDURE proc1 ( name IN VARCHAR2)
:
END proc1;
/

CREATE OR REPLACE PROCEDURE proc2 ( name IN VARCHAR2)
:
END proc2;
/

If I replace the placeholder in the migration script with the combined text then everything works. So it looks like it is something to do with the placeholder replacement with multiple procedure creation statements. If there is only one input file then it works fine.

@alextercete
Copy link
Contributor

@alextercete alextercete commented Jan 2, 2020

@jaa2261 Thanks for reporting this. We now have a fix which will go out in the next release!

@alextercete alextercete added this to the Flyway 6.1.4 milestone Jan 2, 2020
dohrayme pushed a commit to dohrayme/flyway that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants