seppevs / migrate-mongo

A database migration tool for MongoDB in Node
MIT License
902 stars 160 forks source link

API to check if database is up to date #410

Open hugomallet opened 2 years ago

hugomallet commented 2 years ago

Hi,

It would be great if we could call an api from the server to check if the database is up-to-date.

To do something like this for example :

const databaseOutdated = await migrateMongo.isOutdated();
if (databaseOutdated) {
    throw new Error('Please migrate-up your database');
}