#24484: Poor user experience with migrations and running tests
-------------------------------+--------------------
Reporter: acdha | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Prior to Django 1.7, you could create a new app and run tests immediately:
django-admin.py startapp new_app
… add a model & test …
django-admin.py test
Since Django 1.7, however, if you don't run makemigrations first the tests
will fail in a manner which doesn't give any indication of what you can do
to fix it. setup_databases() will eventually fail with a
"OperationalError: no such table" for every model which doesn't have an
initial migration.
I'm filing this under documentation because the easiest path to solve it
would be updating the startapp and running tests docs to add a prominent
notice somewhere that you must run makemigrations before you can run any
tests but if there's a clean way to do it having setup_databases catch
this and give a helpful message would probably save people some searching.
--
Ticket URL: <https://code.djangoproject.com/ticket/24484>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.60f19d15efef5bc28997dfde667dc9ed%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.