Reputation: 1643
I got an existing project that currently uses flyway-ant, version 2.2.1 for its migrations.
For several reasons I need to use 3.2.1 (repair tables for different line endings). Unfortunately once I try to setup an empty test database with flyway 3.2.1, I get the following error from Oracle DB:
Migration V1_15_1_3__AddCommandParamSDCardLogs.sql failed
---------------------------------------------------------
SQL State : 42000
Error Code : 911
Message : ORA-00911: invalid character
Location : /Volumes/dev/cs/IdeaProjects/grd/db/src/sql/1.15/V1_15_1_3__AddCommandParam.sql
Line : 1
Statement : INSERT INTO T_RD_COMMAND (ID, COMMAND_ID, NAME, DISPLAY_ORDER, DISPLAY_NAME, CREATION_TIME, LAST_UPDATE_TIME) VALUES (SEQ_RD_COMMAND_PARAM.NEXTVAL, (SELECT ID FROM T_RD_COMMANDS WHERE COMMAND_NAME = 'GET_LOGS'), 'fromDate', 1, 'From Date', SYSDATE, SYSDATE);
INSERT INTO T_RD_COMMAND (ID, COMMAND_ID, NAME, DISPLAY_ORDER, DISPLAY_NAME, CREATION_TIME, LAST_UPDATE_TIME) VALUES (SEQ_RD_COMMAND_PARAM.NEXTVAL, (SELECT ID FROM T_RD_COMMANDS WHERE COMMAND_NAME = 'GET_LOGS'), 'toDate', 1, 'To Date', SYSDATE, SYSDATE);
Any idea why this happens? Could it be a bug in flyway? Running the migration with flyway 2.2.1 everything's fine, running exactly the same migration with flyway 3.2.1, oracle reports this error.
Btw. it's flyway-ant.
Parsed INSERT statement:
INSERT
INTO T_RD_COMMAND
(
ID,
COMMAND_ID,
NAME,
DISPLAY_ORDER,
DISPLAY_NAME,
CREATION_TIME,
LAST_UPDATE_TIME
)
VALUES
(
SEQ_RD_COMMAND_PARAM.NEXTVAL,
(SELECT ID FROM T_RD_COMMANDS WHERE COMMAND_NAME = 'GET_LOGS'
),
'toDate',
1,
'To Date',
SYSDATE,
SYSDATE
);
Upvotes: 1
Views: 281
Reputation: 81
This appears to be a symptom of this bug: https://github.com/flyway/flyway/issues/1010
Upvotes: 0
Reputation: 35169
This looks like a parsing issue. Please raise a bug report including the statement in the issue tracker.
Upvotes: 1