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.
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
Command Line
What database are you using (type & version)?
MS SQL Server 12
What operating system are you using?
Windows 10
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
I created the following sql script:
CREATE PROCEDURE CreatePriceData
AS
BEGIN
PRINT 'Test'
END
with the settings UTF-8, Windows Line Endings (CR/LF) and named it V1_0__initial.sql.
Then I executed flyway: flyway migrate
What did you expect to see?
I expected flyway to recreate the stored procedure exactly as I specified it in the sql script file.
In my case this is essential since I want to use the Schema Compare Tool of Visual Studio to find any changes I made compared to a productive version of the database.
What did you see instead?
When I opened Microsoft SQL Server Management Studio and tried to modify the stored procedure there was an error box complaining about inconsistent line breaks and offering to repair it.
Since I am usually not doing any Java projects I do want to submit a pr, but I think I found the responsible line in the code:
flyway/flyway-core/src/main/java/org/flywaydb/core/internal/dbsupport/SqlStatementBuilder.java, line 178: statement.append("\n");
This should not use a hardcoded \n but
either the used line endings of the script file (preferrably)
make the used line endings configurable
I can provide more info or test changes if you need anything.
The text was updated successfully, but these errors were encountered:
What version of Flyway are you using?
Flyway 4.0-4.0.3
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
Command Line
What database are you using (type & version)?
MS SQL Server 12
What operating system are you using?
Windows 10
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
I created the following sql script:
with the settings UTF-8, Windows Line Endings (CR/LF) and named it
V1_0__initial.sql
.Then I executed flyway:
flyway migrate
What did you expect to see?
I expected flyway to recreate the stored procedure exactly as I specified it in the sql script file.
In my case this is essential since I want to use the Schema Compare Tool of Visual Studio to find any changes I made compared to a productive version of the database.
What did you see instead?
When I opened Microsoft SQL Server Management Studio and tried to modify the stored procedure there was an error box complaining about inconsistent line breaks and offering to repair it.
Since I am usually not doing any Java projects I do want to submit a pr, but I think I found the responsible line in the code:
flyway/flyway-core/src/main/java/org/flywaydb/core/internal/dbsupport/SqlStatementBuilder.java, line 178:
statement.append("\n");
This should not use a hardcoded
\n
butI can provide more info or test changes if you need anything.
The text was updated successfully, but these errors were encountered: