root / env / lib / python2.7 / site-packages / south / v2.py @ d1a4905f
History | View | Annotate | Download (481 Bytes)
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 |
|
6 |
from south.utils import ask_for_it_by_name |
7 |
|
8 |
class BaseMigration(object): |
9 |
|
10 |
def gf(self, field_name): |
11 |
"Gets a field by absolute reference."
|
12 |
return ask_for_it_by_name(field_name)
|
13 |
|
14 |
class SchemaMigration(BaseMigration): |
15 |
pass
|
16 |
|
17 |
class DataMigration(BaseMigration): |
18 |
# Data migrations shouldn't be dry-run
|
19 |
no_dry_run = True
|