#25884: migrate --run-syncdb doesn't [seem to] work for app without migrations
----------------------------+--------------------------------
Reporter: gertjanol | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.9
Severity: Normal | Keywords: syncdb, migrations
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------
As [https://docs.djangoproject.com/en/1.9/ref/django-admin/#django-admin-
option---run-syncdb the docs state], "the --run-syncdb option allows
creating tables for apps without migrations.". However, this doesn't seem
to work. To demonstrate this, [https://github.com/gertjanol/django-test
I've created a very simple Django project] from the first steps of the
tutorial. When running 'python manage.py migrate --run-syncdb polls' I get
the error "CommandError: App 'polls' does not have migrations.", while I
expected an sqlite-database with the structure.
It makes no difference if I created a 'migrations' directory with just an
'__init__.py'.
Is this a bug, or is this intended behaviour and are the docs off (or do I
not understand them)?
I've managed to get the command working with some minor adjustments to
https://github.com/django/django/blob/1.9/django/core/management/commands/migrate.py,
but I'm too unfamiliar with the code to be sure I didn't break anything
else. I'll try to whip up a PR though.
--
Ticket URL: <https://code.djangoproject.com/ticket/25884>
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/052.0c61bb991795d5b08df17aefb126f5fc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.