Skip to content

Instantly share code, notes, and snippets.

@pbanaszkiewicz
Last active December 19, 2015 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbanaszkiewicz/5949891 to your computer and use it in GitHub Desktop.
Save pbanaszkiewicz/5949891 to your computer and use it in GitHub Desktop.
Managing migrations for Ganeti Web Manager

MIGRATIONS

During Ganeti Web Manager refactoring one huge application (ganeti_web) was turned into many smaller applications (actual list: authentication, clusters, django_test_tools, ganeti_web, jobs, muddle, muddle_users, nodes, utils, virtualmachines, vm_templates).

However, over 19 migrations are still placed in ganeti_web application. How to make them work? My idea is as follows:

  • Run ganeti_web migrations first
  • (fake migration 0008, because it fails; then continue ganeti_web migrations) -- not true anymore, I just commented out that migration
  • run schema migrations for other apps (only change table names)
  • proceed with any other (future) migrations

Writing new migrations

Because there are no models in ganeti_web, developers shouldn't create any migrations for this application. Instead, create migrations for specific applications -- just remember to proceed with bigger migration number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment