Git Product home page Git Product logo

Comments (4)

keblodev avatar keblodev commented on September 26, 2024

@rosesonfire a quickie here:

....
return migrator.run('up')
                    .then(successfulMigration => {
                        resolve(successfulMigration);
                    })
                    .catch(err => {
                        if (err.toString() === "Error: There are no migrations to run") {
                            console.warn("There are no migrations to run");
                            resolve();
                        } else {
                            reject(err);
                        }
                    });

or same thing using async/await + try/catch.

But yes this definitely should NOT be an throw Error(), but a warning

from migrate-mongoose.

rosesonfire avatar rosesonfire commented on September 26, 2024

Looks great! But I don't want to write up a js script for this. I just want to use the migrate CLI. Yes, this should be a warning, not an error. Or whether it should throw an error or a warning should be configurable.

from migrate-mongoose.

keblodev avatar keblodev commented on September 26, 2024

@rosesonfire agreed. @balmasi will you take a look at the PR if I submit one? cuz I see there's bunch of pending PRs and I'm not sure if you're still willing to maintain the repo.

from migrate-mongoose.

balmasi avatar balmasi commented on September 26, 2024

Released in 4.0.0

I appreciate bringing this to my attention!

from migrate-mongoose.

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.