Thanks Ed, I gave that a shot but it resulted in other errors, probably
because then the rest of forms migrations were missing.

It would also make migrating in production a very onerous process and I
think greatly reduces the utility of EXTRA_MODEL_FIELDS since they would no
longer work with Fabric.

I came up with the following to address the problem
https://gist.github.com/joshcartme/f8dc0f3a238024c52681

The problem was that the app_label being used by the migrations, i.e.
https://github.com/django/django/blob/master/django/db/migrations/operations/fields.py#L43,
was incorrect.  So that app_label was form_mods when really I would want it
to be forms.

The above works, but is only a partial solution since it supports adding
fields but not other potential migration operations.

I think the best solution may be getting a patch in Django itself that
allows specifying the app_label (like I did in my gist) to any migration
operation.  Then maybe we could add a little sugar in mezzanine around the
makemigrations command that adds the app_label if the field being modified
is in EXTRA_MODEL_FIELDS.

Thoughts?

On Tue, Jul 14, 2015 at 1:48 PM, Eduardo Rivas <[email protected]>
wrote:

> Perhaps something like this:
> https://docs.djangoproject.com/en/1.8/ref/settings/#migration-modules?
>
> Not sure how that's gonna work when Mezzanine itself ships some new
> migrations in the future. Maybe one has to toggle MIGRATION_MODULES
> manually to apply the correct migrations.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to