new_contents: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.15 on 2018-10-12 14:35
  from __future__ import unicode_literals
  
  from django.db import migrations
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('osf', '0137_merge_20181011_1525'),
      ]
  
      operations = [
          migrations.RunSQL(
              [
                  """
                  CREATE UNIQUE INDEX osf_basefilenode_non_trashed_unique_index
                  ON public.osf_basefilenode
                  (target_object_id, name, parent_id, type, _path)
                  WHERE type NOT IN ('osf.trashedfilenode', 'osf.trashedfile', 'osf.trashedfolder');
                  """,
              ],
              [
                  """
                  DROP INDEX public.osf_basefilenode_non_trashed_unique_index RESTRICT;
                  """
              ]
          ),
      ]
  
subject: add migration to reinstate uniqueness constraint to files of the same node with the same path.