forked from flyway/flyway
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
What version of Flyway are you using?
release-4.0.3-mongodb
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin, SBT plugin, ANT tasks)
Java API
What database are you using (type & version)?
MongoDB 3.3
What operating system are you using?
OSX El Capitan
What did you do?
(Please include the content causing the issue, any relevant configuration settings, and the command you ran)
execute mongoFlyway.migrate on server where db is not yet created
What did you expect to see?
migration work
What did you see instead?
We have a microservice architecture in which each microservice uses a mongo client on behalf of a user with only readWrite privileges. When a db is not yet created, or also in the case where it is created but the schema_version collection is not yet created, a listDatabases method is called which is not available for a regular user. This throws a FlywayException and migration dies. Our workaround is to catch the exception on listDatabases and then make a call to find the schema_version collection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels