# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-04-22 13:28
from __future__ import unicode_literals

from django.db import migrations


def lagg_fec(apps, schema_editor):
    """
    LAGG fec protocol does not exist anymore in latest FreeBSD 11
    """
    LAGGInterface = apps.get_model('network', 'LAGGInterface')
    LAGGInterface.objects.filter(lagg_protocol='fec').update(lagg_protocol='loadbalance')


class Migration(migrations.Migration):

    dependencies = [
        ('network', '0001_initial'),
    ]

    operations = [
        migrations.RunPython(lagg_fec),
    ]
