old_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.13 on 2018-07-03 15:57
  from __future__ import unicode_literals
  from __future__ import absolute_import
  
  from django.db import migrations
  from corehq.sql_db.operations import HqRunSQL
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('form_processor', '0070_auto_20180329_1016'),
      ]
  
      operations = [
          migrations.AlterIndexTogether(
              name='caseattachmentsql',
              index_together=set([('case', 'name')]),
          ),
          HqRunSQL(
              "SELECT 1",
              # populate identifier with name on reverse migration
              "UPDATE form_processor_caseattachmentsql SET identifier=name",
          ),
      ]
  
new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.13 on 2018-07-03 15:57
  from __future__ import unicode_literals
  from __future__ import absolute_import
  
  from django.db import migrations
  from corehq.sql_db.operations import HqRunSQL
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('form_processor', '0070_auto_20180329_1016'),
      ]
  
      operations = [
          migrations.AlterIndexTogether(
              name='caseattachmentsql',
              index_together=set([('case', 'name')]),
          ),
          HqRunSQL(
              """
                  ALTER TABLE form_processor_caseattachmentsql
                  ALTER COLUMN identifier DROP NOT NULL
              """,
              """
                  UPDATE form_processor_caseattachmentsql SET identifier=name;
                  ALTER TABLE form_processor_caseattachmentsql
                  ALTER COLUMN identifier SET NOT NULL
              """,
          ),
      ]
  
subject: Drop not null constraint.