{{{
MIGRATION_MODULES = {
'docflow': 'docflow_projects.migrations',
}
}}}
case 1) app docflow has no package "migrations"
- ./manage.py makemigrations
initial migration not create
case 2) app docflow has package "migrations"
- run "./manage.py makemigrations"
created initial migration in docflow_projects.migrations 0001_initial (ok)
- run "./manage.py makemigrations"
create migration deleted all field and models in app!
0002_auto_20141205_1349 (error)
- run "./manage.py makemigrations"
raise
CommandError: Conflicting migrations detected (0002_auto_20141205_1349,
0001_initial in docflow).
case 3)
run ./manage.py makemigrations docflow
it's ok
--
Ticket URL: <https://code.djangoproject.com/ticket/23961>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* easy: 1 => 0
* needs_docs: => 0
* type: Uncategorized => Bug
* stage: Unreviewed => Accepted
Comment:
It seems the fix for #22682 (allowing `makemigrations` to create the
migrations package) only works if you specify the `app_label`. We should
either update the documentation that was added as part of that ticket (in
`docs/ref/settings.txt`) or see if we can make package creation happen
when using `makemigrations` without an `app_label`.
I couldn't tell if there were any more problems besides that in your
report. If so, a separate ticket may be appropriate.
--
Ticket URL: <https://code.djangoproject.com/ticket/23961#comment:1>
Comment (by carljm):
I thought that until support for apps without migrations was removed, it
was intentional that `makemigrations` would only create the migrations
module if you gave it an app-label (I think that's the behavior with or
without `MIGRATION_MODULES` set). Otherwise it would be very difficult to
use migrated apps alongside unmigrated apps in the same project. I think
the plan is in Django 1.9 (when support for unmigrated apps goes away),
makemigrations should start always creating the migration module.
I'm not entirely sure about that, but that was my understanding. If that's
the case, there still may be a documentation update needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/23961#comment:2>
* status: new => assigned
* owner: nobody => timgraham
* component: Migrations => Documentation
--
Ticket URL: <https://code.djangoproject.com/ticket/23961#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"fa6e3a40e1866b64eb30e0dfbd43b340c0d831da"]:
{{{
#!CommitTicketReference repository=""
revision="fa6e3a40e1866b64eb30e0dfbd43b340c0d831da"
Fixed #23961 -- Clarified when makemigrations will create a directory.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23961#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"da562d6a8785d28b75475c1c3d1eb5987253bc35"]:
{{{
#!CommitTicketReference repository=""
revision="da562d6a8785d28b75475c1c3d1eb5987253bc35"
[1.7.x] Fixed #23961 -- Clarified when makemigrations will create a
directory.
Backport of fa6e3a40e1866b64eb30e0dfbd43b340c0d831da from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23961#comment:5>