Giter Site home page Giter Site logo

risksense / flyway Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flyway/flyway

8.0 7.0 2.0 10.42 MB

Flyway by Boxfuse • Database Migrations Made Easy.

Home Page: https://flywaydb.org

License: Apache License 2.0

Batchfile 0.42% Java 93.54% Shell 0.10% SQLPL 0.83% PLSQL 2.90% PLpgSQL 0.34% HTML 0.23% Scala 1.63%

flyway's Introduction

Database Migrations Made Easy.

Flyway

Evolve your database schema easily and reliably across all your instances.

Simple, focused and powerful.

Works on

Windows, Mac OSX, Linux, Java and Android

Supported build tools

Maven, Gradle, Ant and SBT

Supported databases

Oracle, SQL Server, SQL Azure, DB2, DB2 z/OS, MySQL, MariaDB, Google Cloud SQL, PostgreSQL, Redshift, Vertica, H2, Hsql, Derby, SQLite

Third party plugins

Grails, Play!, Grunt, Griffon, Ninja, ...

Documentation

https://flywaydb.org

How to contribute

https://flywaydb.org/documentation/contribute/

About

Flyway is brought to you by Axel Fontaine and Boxfuse with the help of many contributors.

License

Copyright (C) 2010-2016 Boxfuse GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Trademark

Flyway is a registered trademark of Boxfuse GmbH.

flyway's People

Contributors

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

Stargazers

Weavver, Inc. avatar nandem avatar  avatar huiqin zhou avatar Christian Schneider avatar Andrey Yeremenok avatar Sergii Stotskyi avatar  avatar

Watchers

James Cloos avatar Jim avatar Mike Hindman avatar Christian Romano avatar Pankaj Khatkar avatar James Cooke avatar  avatar

Forkers

selengge jchu59

flyway's Issues

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.

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.

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.