If there are pending migrations, tell the app to shut down #737
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #671
Fixes luckyframework/lucky#1142
This PR adds a front and center error when there's pending migrations.
Before PR:
After PR:
there is one minor issue still here which is if you boot your app locally without a process manager (e.g.
![Screen Shot 2021-10-03 at 9 25 35 AM](https://user-images.githubusercontent.com/2391/135762915-c6c2fbe3-3d11-4b07-8ef4-f63535f3d1fa.png)
crystal src/start_server.cr
), it will try to send interrupt signals to the parent process.Most likely this isn't a big issue. You can even just run
lucky watch
and it's fine. It's only when booting the app manually through crystal.