boxed / django-fastdev

An app to make it safer, faster and more fun to develop in Django
BSD 3-Clause "New" or "Revised" License
169 stars 14 forks source link

Crash page on not running migrations? Run them right there! #6

Open boxed opened 2 years ago

boxed commented 2 years ago

It would be very cool if the crash page on missing migrations would have a button to makemigrations+migrate!

Example error

ProgrammingError at /admin/store/product/1/edit/
column store_product.amount_limit does not exist
LINE 1: ...oduct"."image_id", "store_product"."description", "store_pro...
boxed commented 2 years ago

We should also check the list of applied migrations in the DB, and check that all of those exist on disk. If they don't, tell the user why that is a big problem, and tell the user that the best way forward is to delete the db and start from scratch.