Raise error if there are migrations pending
In Rails 5.x+, if migrations are pending, an error is raised and error page is shown in development.
Since we don't have an "error page" I was thinking we would just raise an error (when in development).
Hi @mgomes ,
Is someone working on this enhancement ? If not, then i would like to start working on this. And what is the exact enhancement description ? According to my knowledge, i think if there are pending migrations then while starting the server it should return an error message as Migrations are pending. To resolve this issue, run: stealth db:migrate. Should the scenario be considered, if the server is already running and migration is generated, should the request be checked and display error message ? Please do correct me if i am wrong .
Thanks
@debasish117 thanks so much for stepping up. I updated the issue to contain a little more info. I was thinking that in development, an error would be raised if migrations were pending. But let me know if you have other suggestions.
Right now we don't do hot code reloading in development (#55). I just couldn't get that done in time for 1.0, but it's still high on my priority list. So I think just showing the error on server start may not be enough.
What do you think?
I think we can check it in the controller level too. On request we can have check, if there are migrations pending then throw an error . We can have a filter to check the migrations, i think so .