# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('budget_position', '0020_budgetpositionassignment_non_unique_oebs_assignment_id'),
    ]

    operations = [
        migrations.RunSQL(
            sql="CREATE UNIQUE INDEX budget_position_budgetpositionassignment_budget_position_previous_assignment_idx on budget_position_budgetpositionassignment(budget_position_id) WHERE previous_assignment_id IS NULL;",
            reverse_sql='DROP INDEX budget_position_budgetpositionassignment_budget_position_previous_assignment_idx;',
        ),
    ]
