old_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.13 on 2018-03-04 23:14
  from __future__ import unicode_literals
  import json
  
  from django.db import migrations
  
  
  def populate_default(apps, schema_editor):
      ScriptParameter = apps.get_model('wooey', 'ScriptParameter')
      for obj in ScriptParameter.objects.all():
          try:
              obj.default = json.loads(obj._default)
          except Exception:
              obj.default = obj._default
          obj.save()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('wooey', '0036_add-jsonfield'),
      ]
  
      operations = [
          migrations.RunPython(populate_default)
      ]
  
new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.13 on 2018-03-04 23:14
  from __future__ import unicode_literals
  import json
  
  from django.db import migrations
  
  
  def populate_default(apps, schema_editor):
      ScriptParameter = apps.get_model('wooey', 'ScriptParameter')
      for obj in ScriptParameter.objects.all():
          try:
              obj.default = json.loads(obj._default)
          except Exception:
              obj.default = obj._default
          obj.save()
  
  
  def reverse_populate_default(apps, schema_editor):
      ScriptParameter = apps.get_model('wooey', 'ScriptParameter')
      for obj in ScriptParameter.objects.all():
          obj._default = json.dumps(obj.default)
          obj.save()
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('wooey', '0036_add-jsonfield'),
      ]
  
      operations = [
          migrations.RunPython(populate_default, reverse_populate_default)
      ]
  
subject: Add reverse to data migration