Skip to content

Commit

Permalink
Added emtpy backwards migration to custom data migration.
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowcap committed May 22, 2017
1 parent c032900 commit 85a5099
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion raster/migrations/0036_auto_20170509_0548.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,19 @@ def set_legend_on_entry(apps, schema_editor):
entry.save()


def run_backwards(apps, schema_editor):
# The backward migration does not have to do anythign, the data
# is copied to the new fields but not removed. The data gets removed
# in the subsequent migration where the entry through table is dropped.
pass


class Migration(migrations.Migration):

dependencies = [
('raster', '0035_auto_20170509_0545'),
]

operations = [
migrations.RunPython(set_legend_on_entry),
migrations.RunPython(set_legend_on_entry, run_backwards),
]

0 comments on commit 85a5099

Please sign in to comment.