# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-02 20:43
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='Country',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.CharField(max_length=8)),
            ],
        ),
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=48)),
                ('plot', models.CharField(default=None, max_length=500)),
                ('language', models.CharField(default=None, max_length=8)),
                ('runtime', models.TimeField(default=None)),
                ('rate', models.CharField(default=None, max_length=5)),
            ],
        ),
        migrations.CreateModel(
            name='Human',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=48)),
                ('firstname', models.CharField(max_length=48)),
                ('birthday', models.DateField()),
                ('deathday', models.DateField(default=None)),
                ('birthdayPlace', models.CharField(default=None, max_length=255)),
                ('description', models.CharField(default=None, max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='HumanCountry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Country')),
                ('human', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Human')),
            ],
        ),
        migrations.CreateModel(
            name='HumanJob',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('human', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Human')),
            ],
        ),
        migrations.CreateModel(
            name='HumanMovie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('human', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Human')),
            ],
        ),
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job', models.CharField(max_length=48)),
            ],
        ),
        migrations.CreateModel(
            name='Kind',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kind', models.CharField(max_length=48)),
            ],
        ),
        migrations.CreateModel(
            name='MovieKind',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kind', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Kind')),
            ],
        ),
        migrations.CreateModel(
            name='MovieSerieCountry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Country')),
            ],
        ),
        migrations.CreateModel(
            name='MovieSerieDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=4)),
                ('title', models.CharField(max_length=255)),
                ('plot', models.CharField(max_length=500)),
                ('release', models.DateField()),
                ('language', models.CharField(max_length=8)),
                ('runtime', models.TimeField(default=None)),
                ('rate', models.CharField(default=None, max_length=5)),
                ('videoFormat', models.CharField(max_length=5)),
                ('country', models.ManyToManyField(through='Search.MovieSerieCountry', to='Search.Country')),
                ('kind', models.ManyToManyField(through='Search.MovieKind', to='Search.Kind')),
            ],
        ),
        migrations.CreateModel(
            name='Season',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('plot', models.CharField(max_length=500)),
                ('runtime', models.CharField(default=None, max_length=8)),
                ('rate', models.CharField(default=None, max_length=5)),
                ('episode', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Episode')),
            ],
        ),
        migrations.AddField(
            model_name='movieseriedetails',
            name='season',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Search.Season'),
        ),
        migrations.AddField(
            model_name='movieseriecountry',
            name='movieSerie',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.MovieSerieDetails'),
        ),
        migrations.AddField(
            model_name='moviekind',
            name='movieSerie',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.MovieSerieDetails'),
        ),
        migrations.AddField(
            model_name='humanmovie',
            name='movieSerie',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.MovieSerieDetails'),
        ),
        migrations.AddField(
            model_name='humanjob',
            name='job',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Search.Job'),
        ),
        migrations.AddField(
            model_name='human',
            name='job',
            field=models.ManyToManyField(through='Search.HumanJob', to='Search.Job'),
        ),
        migrations.AddField(
            model_name='human',
            name='nationality',
            field=models.ManyToManyField(through='Search.HumanCountry', to='Search.Country'),
        ),
        migrations.AddField(
            model_name='human',
            name='playing',
            field=models.ManyToManyField(through='Search.HumanMovie', to='Search.MovieSerieDetails'),
        ),
    ]
