0001: The migration supplied by contrib.auth as is.
0002: Migration that adds my custom fields to auth.Group table. ( looks
like this: https://gist.github.com/owais/cabc53a79e7b092457cc)
The problem is that when I run the migrations for auth, django creates the
final schema structure after running 0001 and as a result when django runs
0002, it complains about some fields already being present.
I'm patching the Group model like this:
https://gist.github.com/owais/994e3d2826f225142304
This patch runs right before manage.py calls a command.
--
Ticket URL: <https://code.djangoproject.com/ticket/23392>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* needs_better_patch: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/23392#comment:1>
Comment (by collinanderson):
I don't think we support adding custom fields to the auth.Group model, but
could it be that the signal is being run on the 0001 migration state,
which makes django think that nothing's changed in 0002?
--
Ticket URL: <https://code.djangoproject.com/ticket/23392#comment:2>
* status: new => closed
* resolution: => invalid
Comment:
We don't support monkeypatching models like this, so I'm going to have to
close as INVALID. If you can reproduce it on a separate, fresh app we can
reopen, but I suspect it's the very overloading of the model itself that's
causing this.
--
Ticket URL: <https://code.djangoproject.com/ticket/23392#comment:3>