1. Andrew Godwin
  2. south
  3. Pull requests

Pull requests

#133 Merged
Repository
skyjur
Branch
default
Repository
andrewgodwin
Branch
default

Allow to override shcemamigration template by extending command class

Author
  1. Skirmantas Jurgaitis
Reviewers
Description

This small change will allow to extend south.management.commands.schemamigration.Command and override MIGRATION_TEMPLATE.

Rationale behind the change:

We use one code base but different migration sets for different deployments because database schema is dependent on a couple of settings which enables/disables some functionality. I want to be able to create my initial migrations quickly. I also need to put some tweaks for every initial migration. In my case it was adding "depends_on" attribute. Doing it manually every time is a pain. This change allows to override MIGRATION_TEMPLATE and thus easily add tweaks I need.

Comments (0)