I executed a migration (version 9.22.0) where I specified baselineOnMigrate=true, in an existing SQL Server database, where Flyway was not used before. In the schemas specified I had one schema that didn't exist yet. The result was that Flyway ran all the deployment scripts. I didn't expect this. I expected the database to be baselined.
I ran the same migration using older Flyway versions (7.15, 8.3) and the database got baselined, as I expected.
What should be the correct behaviour? In the documentation I could not find anything related a missing schema and ignoring baselineOnMigrate=true.
Comments
2 comments
-
Hi mpollo,
Am I correct in saying in this scenario there was an existing schema history table in another schema? -
No, there was no history table for another schema. Flyway wasn't used for that database yet, however it was already in line with the deployment scripts. Besides one schema specified in the schemas parameter, that didn't exist yet.
Add comment
Please sign in to leave a comment.