Validation fails on migrate when schema doesn't exist #1331
What version of Flyway are you using?
What database are you using (type & version)?
What operating system are you using?
What did you do?
Run flyway migrate on a new database which doesn't have initial schema.
Flyway flyway = new Flyway();
What did you expect to see?
I expected that new schema will be created and then all other migration tasks will be executed.
What did you see instead?
Exception happens on validation step and as a result migration doesn't continue:
Workaround is to switch off validateOnMigrate but it is not convenient for general solution.
The text was updated successfully, but these errors were encountered:
I can (must) confirm the issue. It arises with an completely empty database, due to some chicken/egg problem:
a) Completely empty means, in particular, that my schema (SA) does not exist.
in DerbyDbSupport.doChangeCurrentSchemaTo. That fails, of course, because the schema does not
I am unsure, how to handle this situation. Nevertheless, it exists: (See the following stacktrace.)
I can reproduce the problem with this simple test case: