# Generated by Django 2.2.5 on 2019-11-28 13:33

from django.db import migrations


def add_nn(apps, schema_editor):
    # We can't import the Person model directly as it may be a newer
    # version than this migration expects. We use the historical version.
    NeuralNetwork = apps.get_model('api', 'NeuralNetwork')
    NeuralNetwork.objects.create(name='interior_vs_trash', external_id=40764, kind='CLA')
    NeuralNetwork.objects.create(name='furniture-v1', external_id=-1, kind='DET')
    NeuralNetwork.objects.create(name='textures', external_id=40826, kind='CLA')
    NeuralNetwork.objects.create(name="imagenet-inception-v3", external_id=-1, kind='CLA')


def delete_nn(apps, schema_editor):
    NeuralNetwork = apps.get_model('api', 'NeuralNetwork')
    NeuralNetwork.objects.filter(name__in=['interior_vs_trash', 'furniture-v1', 'textures', 'imagenet-inception-v3']).delete()

class Migration(migrations.Migration):

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

    operations = [
        migrations.RunPython(add_nn, delete_nn),
    ]
