# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-09 11:02
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='Critic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('url', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='Movie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position', models.IntegerField()),
                ('name', models.CharField(max_length=250)),
                ('picture', models.CharField(max_length=500)),
                ('score', models.IntegerField()),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
            ],
        ),
        migrations.AddField(
            model_name='movie',
            name='actor',
            field=models.ManyToManyField(related_name='actor', to='movies.Person'),
        ),
        migrations.AddField(
            model_name='movie',
            name='author',
            field=models.ManyToManyField(related_name='author', to='movies.Person'),
        ),
        migrations.AddField(
            model_name='movie',
            name='director',
            field=models.ManyToManyField(related_name='director', to='movies.Person'),
        ),
        migrations.AddField(
            model_name='movie',
            name='genre',
            field=models.ManyToManyField(related_name='genre', to='movies.Genre'),
        ),
        migrations.AddField(
            model_name='movie',
            name='production_company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Organization'),
        ),
        migrations.AddField(
            model_name='critic',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Person'),
        ),
        migrations.AddField(
            model_name='critic',
            name='movie',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='critics', to='movies.Movie'),
        ),
        migrations.AddField(
            model_name='critic',
            name='publisher',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='movies.Organization'),
        ),
    ]
