flyway/flyway — pull request #800 by dan-nawrocki (2014-07-14 03:37:37+00:00)
Title: Handle Oracle java source

I'm using flyway on a very large Oracle schema. One of the issues I found was that attempting to run a SQL script with embedded Java code caused the JDBC layer to interpret the Java code as a stored procedure, which obviously threw ORA- errors. The same SQL script runs fine in sqlplus.

This pull request has two parts. The first fixes the parsing code to look for the '/' delimiter after starting a Java block. The second is the addition of a flag to selectively turn on/off JDBC escape processing. I chose to use a Boolean for this to represent the three possible values for the JDBC escape processing flag: true=on, false=off, null=driver default. The way that it's currently written, JDBC escape processing can only be disabled for SQL parsed from a migration file; it is not used for the schema_version table updates as that was giving me some trouble.

Let me know if there's anything you'd like me to add in order to get this in to 3.1.