# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-01 01:05
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('dvaapp', '0005_auto_20170430_2305'),
    ]

    operations = [
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('region_type', models.CharField(choices=[('A', 'Annotation'), ('D', 'Detection'), ('P', 'Polygon'), ('S', 'Segmentation')], max_length=1)),
                ('parent_frame_index', models.IntegerField(default=-1)),
                ('metadata_text', models.TextField(default='')),
                ('metadata_json', models.TextField(default='')),
                ('label', models.TextField(default='')),
                ('full_frame', models.BooleanField(default=True)),
                ('x', models.IntegerField(default=0)),
                ('y', models.IntegerField(default=0)),
                ('h', models.IntegerField(default=0)),
                ('w', models.IntegerField(default=0)),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='date created')),
                ('vdn_key', models.IntegerField(default=-1)),
                ('object_name', models.CharField(max_length=100)),
                ('confidence', models.FloatField(default=0.0)),
                ('frame', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dvaapp.Frame')),
                ('label_parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dvaapp.VLabel')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('vdn_dataset', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dvaapp.VDNDataset')),
                ('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dvaapp.Video')),
            ],
        ),
        migrations.RemoveField(
            model_name='annotation',
            name='frame',
        ),
        migrations.RemoveField(
            model_name='annotation',
            name='label_parent',
        ),
        migrations.RemoveField(
            model_name='annotation',
            name='user',
        ),
        migrations.RemoveField(
            model_name='annotation',
            name='vdn_dataset',
        ),
        migrations.RemoveField(
            model_name='annotation',
            name='video',
        ),
        migrations.RemoveField(
            model_name='detection',
            name='frame',
        ),
        migrations.RemoveField(
            model_name='detection',
            name='vdn_dataset',
        ),
        migrations.RemoveField(
            model_name='detection',
            name='video',
        ),
        migrations.AlterField(
            model_name='clustercodes',
            name='detection',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dvaapp.Region'),
        ),
        migrations.AlterField(
            model_name='queryresults',
            name='detection',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='dvaapp.Region'),
        ),
        migrations.DeleteModel(
            name='Annotation',
        ),
        migrations.DeleteModel(
            name='Detection',
        ),
    ]
