# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-19 15:32
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filename', models.CharField(max_length=1000)),
                ('mbid', models.UUIDField(blank=True, null=True)),
                ('hasseed', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Match',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('distance', models.FloatField()),
                ('version', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Pattern',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_time', models.FloatField()),
                ('end_time', models.FloatField()),
                ('pair_id', models.IntegerField(blank=True, null=True)),
                ('isseed', models.IntegerField()),
                ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='motifdiscovery.File')),
            ],
        ),
        migrations.CreateModel(
            name='Segment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rounded_start', models.FloatField()),
                ('rounded_end', models.FloatField()),
                ('segment_path', models.CharField(max_length=500)),
                ('file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='motifdiscovery.File')),
            ],
        ),
        migrations.AddField(
            model_name='pattern',
            name='segment',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='patterns', to='motifdiscovery.Segment'),
        ),
        migrations.AddField(
            model_name='match',
            name='source',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='match_sources', to='motifdiscovery.Pattern'),
        ),
        migrations.AddField(
            model_name='match',
            name='target',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='match_targets', to='motifdiscovery.Pattern'),
        ),
    ]
