This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import migrations | |
def merge_foo_into_bar(apps, schema_editor): | |
""" For each FooCategory, create a corresponding BarCategory (with the new type) | |
and for each Foo, create a corresponding Bar. | |
The idea is that Foo and FooCategory would be dropped in a subsequent migration. | |
""" | |
Foo = apps.get_model('myapp', 'Foo') |
OlderNewer