Thursday, October 27, 2016

Re: Migrations with multiple databases



On Tuesday, October 25, 2016 at 5:05:46 PM UTC+2, 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.


Hi Andrea.

I can suggest you switching to external db migration tool. The Liquibase works for me and my team for years in a quite big projects.

There is a Liquibase adapter for Django - Liquimigrate, which wraps cmd execution using connections defined in settings.DATABASES, and bypasses original "migrate" management commands.

The downside is that you'll have no automatic changeset generation from Django models, you must be familiar with Liquibase changesets syntax (XML, JSON or plain SQL files), and it requires JRE. But the good side is that you have independent, powerfull and rock-solid db migration subsystem with multidb support. It's worth trying.

Marcin

--
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/5da3f01e-9c57-45af-a432-c729dab84060%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment