old_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.6 on 2017-06-22 11:22
  from __future__ import unicode_literals
  
  from django.db import migrations
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('datasets', '0020_annotation_taxonomy_node'),
      ]
  
      operations = [
          migrations.RemoveField(
              model_name='annotation',
              name='value',
          ),
      ]
  
new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.10.6 on 2017-06-22 11:22
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  
  
  def forward_func(apps, schema_editor):
      pass
  
  
  def reverse_func(apps, schema_editor):
      Annotation = apps.get_model('datasets', 'Annotation')
      for annotation in Annotation.objects.all():
          annotation.value = annotation.taxonomy_node.node_id
          annotation.save()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('datasets', '0020_annotation_taxonomy_node'),
      ]
  
      operations = [
          migrations.RunPython(forward_func, reverse_func),
          migrations.AlterField(
              model_name='annotation',
              name='value',
              field=models.CharField(max_length=200, db_index=True, default=''),
          ),
          migrations.RemoveField(
              model_name='annotation',
              name='value',
          ),
      ]
  
subject: Make migration reversible