Dev G
Dev G

Reputation: 1407

flywaydb: Command Line migrate limitation

I am planning to use flywayDb to automate SQL script migration part of my project for the same purpose i tried to test it but it failed one one SQL script saying some Invalid Character error which I am unable to identify where as same script is working fine inside AQT/SQL Developer.

Do we have any restrictions or standards need to follow while using command line migrate?

I have doubt on some values which are using single quote and slash symbols... like below

'Family Member''s' OR SOME \ TEXT

Please suggest.

Upvotes: 1

Views: 228

Answers (1)

Dev G
Dev G

Reputation: 1407

I was able to find issue problem was with one merge statement in which field value and field name was not having space

hence flyway DB was throwing error...I added one space and it worked. Where as without removing space works fine in AQT and sqldeveloper

MERGE INTO TEST.question ques USING 
(SELECT '2004'question_id,'Details (Header)' question_text  FROM DUAL) S
ON (ques.Question_id = S.Question_id)   
WHEN MATCHED THEN UPDATE    
    SET 
    ques.text=S.text;

Correct one

MERGE INTO TEST.question ques USING 
(SELECT '2004' question_id,'Details (Header)' question_text  FROM DUAL) S
ON (ques.Question_id = S.Question_id)   
WHEN MATCHED THEN UPDATE    
    SET 
    ques.text=S.text;

Upvotes: 1

Related Questions