Giter Club home page Giter Club logo

Comments (4)

davidmweber avatar davidmweber commented on June 8, 2024

Not that I know of. Do you have a test migration (preferably for H2) that I can use?

from flyway-sbt.

micheal-hill avatar micheal-hill commented on June 8, 2024

Working with a single migration, with the option flywayIgnoreMissingMigrations explicitly set to false (which appears to be the default, anyway).

In file V20181018__create_foo.sql:

CREATE TABLE test_user (
  name VARCHAR(25) NOT NULL,
  PRIMARY KEY(name)
);

Running the migration works without issue. However, if I delete the migration file after it has been run and try to run the migrations again, I only receive a warning and the migration task passes without error.


Researching this issue; it appears that the flyway option ignoreFutureMigrationsproduces the behavior I'm looking for when I use the CLI tool. However, I couldn't get the sbt version of this option to work as I expected (it didn't seem to have any affect). For now, I will use the flyway CLI tool as it appears to do what I need.

from flyway-sbt.

davidmweber avatar davidmweber commented on June 8, 2024

Thanks! I'll make a test case and dig in to it.

from flyway-sbt.

davidmweber avatar davidmweber commented on June 8, 2024

I have refactored the logic for setting migration parameters. Seems that ignoreFutureMigrations setting got lost in some deprecation. Can you check if the fail-on-error branch fixes this? You can sbt publishLocal and use 5.2.1-SNAPSHOT for the plugin version. If this fails, I will set up a more complex test case against a persistent database.

from flyway-sbt.

Related Issues (20)

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.