-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pending migration alert during app startup #1329
Comments
Moved to the CLI repo because the core library is not aware of the migrations (it is entirely a cli concern). We could definitely add a cli subcommand that checks this, that you could use in your start command |
This is strongly related to the |
No, IMO. I'm talking about a logic that will terminate the app during bootup when there is a pending migration. |
This is something you'll need to run before you boot your app and decide whether the app may boot based on the exit status of the cli. The core library, which you use in your app, has no knowledge of migrations. This is because you can use any migration tool, you're not limited to the sequelize cli. Alternatively you can use Depending on how |
Thanks for explanation and it make sense now. Should I start working on this feature? |
We're actually planning on rewriting the CLI from scratch, so it's unlikely that we'll do much on this repository anymore |
Issue Creation Checklist
Feature Description
Pending migration (if any) alert during app startup.
Describe the feature you'd like to see implemented
I checked sequelize docs but didn't find any way of getting notified if there is pending migration left. This could be useful in many ways when there are multiple devs working on the project.
During app startup, upon initialization of sequelize we should check for current migrations in DB and existing migrations in the migrations folder, and upon any mismatch we throw a non-zero exit and stop the application with a message. All this can be configurable IMO.
Describe why you would like this feature to be added to Sequelize
We can have an external npm package for this, but make sense to have it here. Also, this feature is available in Ruby on Rails ActiveRecord gem.
Is this feature dialect-specific?
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the addition of this feature by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: