Wednesday, August 26, 2015

Re: Turn off migrations completely in Django 1.7

On Tue, Aug 25, 2015 at 5:27 PM, Carl Meyer <carl@oddbird.net> wrote:
To my knowledge, out of the many hundreds of
thousands of Django users, you are the first and only one to request a
way to turn off migrations entirely.

I think that's a little unfair, given that migrations are only in Django since 1.7, which isn't even a year old yet. On older versions it was just a matter of not using South. I think there are quite a lot of < 1.7 projects that don't use South.

That said, another way not mentioned yet: database routers have an allow_migrate method. Maybe use a two-database solution with a router, one database for the Django-internal tables that want to be able to migrate, and one for your company's data that always returns allow_migrate False?

Greetings,
Remco Gerlich

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFAGLK2ErvRLwJYD%3DXt7NxbxAaJ%2Ba54dC7951o_LDG0mfy4mPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment