Tuesday, October 25, 2016

Re: Migrations with multiple databases

Hi Andrea,

If you have models that are entirely unrelated in different databases
you could use different values for INSTALLED_APPS to limit the apps
Django sees or by settings the values in the MIGRATION_MODULES dict to
None to tell Django that those apps don't have migrations.

Cheers,

/Markus

On Tue, Oct 25, 2016 at 08:05:46AM -0700, andrea crotti wrote:
>We have a couple of databases with a tiny number of tables, but
>django-migrations has still go through all the migrations anyway.
>So even if the SQL itself is nothing it still takes a massive amount of
>time and memory for the usual known issues with migrations on big projects.
>
>I guess it works this way because it only knows at run time in the router
>if something should be done, however it's a bit odd.
>
>If we declared the models per database somehow statically, could we not
>just skip everything else?
>
>--
>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 https://groups.google.com/group/django-users.
>To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f5340bbf-2247-4068-bd37-9f3a0faf23d4%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20161025152909.GE2361%40inel.local.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment