v2.py 481 B

12345678910111213141516171819
  1. """
  2. API versioning file; we can tell what kind of migrations things are
  3. by what class they inherit from (if none, it's a v1).
  4. """
  5. from south.utils import ask_for_it_by_name
  6. class BaseMigration(object):
  7. def gf(self, field_name):
  8. "Gets a field by absolute reference."
  9. return ask_for_it_by_name(field_name)
  10. class SchemaMigration(BaseMigration):
  11. pass
  12. class DataMigration(BaseMigration):
  13. # Data migrations shouldn't be dry-run
  14. no_dry_run = True