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

flyway fails recognizing sql server delimiter while parsing sql migration #678

lrozek opened this issue Jan 16, 2014 · 3 comments


Copy link

lrozek commented Jan 16, 2014

I will submit a repro project in a minute

Copy link
Contributor Author

lrozek commented Jan 16, 2014

repro project:
tested with SQL Server 2012

The problem is in 4th line of 2nd migration script. Problematic part is {ts '3099-01-01 00:00:00'}, which causes SqlStatementBuilder.extractStringLiteralDelimitingTokens() to incorrectly parse 4th line. As result internal state of SQLServerSqlStatementBuilder indicates that it is in "insideQuoteStringLiteral", which in the end fails at recognizing 'GO' delimiter.

2nd migration script is executed as single JDBC statement. But it should correctly recognize delimiter and run "CREATE TRIGGER" sql statements in two separate JDBC statements

Copy link

jonbom commented Mar 10, 2014

Have same problem with following script:
CREATE Procedure myProcedure
SELECT myTableID+'.jpg' url
from myTable
return 0
grant execute on myProcedure to public

Need to include plus(+)-sign in the tokenizer...

@axelfontaine axelfontaine added this to the Flyway 3.0 milestone Mar 11, 2014
Copy link

Thank you for submitting this and isolating it in the repro project. It was immensely helpful in fixing it.


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

No branches or pull requests

3 participants