Giter Club home page Giter Club logo

flyway's People

Contributors

aaltergot avatar alanfranz avatar andrewlmurray avatar avesse avatar azalesky avatar boothen avatar cdedie avatar cteig avatar dmitrybitman avatar godrja avatar hakkika avatar josephtaylor avatar komu avatar longliveenduro avatar lrozek avatar muni10 avatar murdos avatar nathanvick avatar nhajratw avatar nivolg avatar panchenko avatar pascalgn avatar pauxus avatar pmalouin avatar pwielgolaski avatar renat-sabitov avatar rholder avatar rotscher avatar sanjayd avatar super132 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

selengge jchu59

flyway's Issues

External mongoclients can only be injected into MongoFlyway in a way that leads to NullPointerException

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)
Run the info() and the migrate() commands on MongoFlyway.

What did you expect to see?

info and migrate

What did you see instead?

So the internal mongoclient closes its connection after any single command. So running info and migrate are two commands and that won't work. An external mongoclient will work. However when setting a mongoclient into MongoFlyway, you do not capture a databaseName. Therefore, when constructing the MongoMetaDataTable, an NPE is thrown and migration fails. Our workaround is to add an overloaded setMongoClient that adds a databaseName as a second argument.

Need to support migrations executed on behalf of a user with readWrite privilege

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.

Cannot configure a callback using flyway properties.

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)
Try to configure a callback with the flyway.callbacks property.

What did you expect to see?

A callback executed

What did you see instead?

ClassUtils.instantiate throws a NoSuchMethod exception.

The Callback interface is not public. The abstract MongoFlywayCallback class defines a one-arg method. The ClassUtils that is used to instantiate a configured callback uses Class.forName to instantiate, and that only works with zero-arg constructors. We cannot extend MongoFlywayCallback and add a zero-arg constructor.

Our workaround is to manually set a callback into MongoFlyway, but this is a limited-value solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.