You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
CLI
What database are you using (type & version)?
SQL Server 2016
What operating system are you using?
Amazon linux
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
Tried to run a migration with the following as the first few lines:
/*
some comment
*/
GO
SET NOCOUNT ON
SET NOEXEC OFF
SET ARITHABORT ON
I ran flyway -url='mydburl/mydb' -locations='mylocation' migrate
What did you expect to see?
I expected the migration to run successfully
What did you see instead?
The migration ran fine when I removed GO. When I put GO as the first line of a migration, it will fail with the error below. Is it possible for flyway to ignore this line if no query exists before it? I suggest a simple regex to identify:
If a migration's GO or batch terminator (or configured terminator) has an actual query preceding it or just some comments
Based on previous, ignore the batch terminator if comments are found or run the query if it is found
SQL State : HY000
Error Code : 0
Message : The SQL statement must not be null or empty.
Location : myMigration.sql
Line : 4
Statement :
Thanks!
The text was updated successfully, but these errors were encountered:
What version of Flyway are you using?
4.2.0
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
CLI
What database are you using (type & version)?
SQL Server 2016
What operating system are you using?
Amazon linux
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
Tried to run a migration with the following as the first few lines:
I ran
flyway -url='mydburl/mydb' -locations='mylocation' migrate
What did you expect to see?
I expected the migration to run successfully
What did you see instead?
The migration ran fine when I removed
GO
. When I putGO
as the first line of a migration, it will fail with the error below. Is it possible for flyway to ignore this line if no query exists before it? I suggest a simple regex to identify:GO
or batch terminator (or configured terminator) has an actual query preceding it or just some commentsThanks!
The text was updated successfully, but these errors were encountered: