# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-05-27 06:13
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='CodeWarsProblem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('url', models.CharField(max_length=250)),
                ('url_solution', models.URLField(blank=True, max_length=250, null=True)),
            ],
            options={
                'db_table': 'course_session_codewars',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('date_start', models.DateField()),
                ('date_end', models.DateField(blank=True, null=True)),
                ('slug', models.SlugField()),
            ],
            options={
                'db_table': 'course',
            },
        ),
        migrations.CreateModel(
            name='CourseSession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('num', models.PositiveIntegerField(verbose_name='Course Number')),
                ('date', models.DateField(default=datetime.datetime(2017, 5, 27, 6, 13, 13, 445744))),
                ('slides_url', models.URLField(blank=True, max_length=250, null=True)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recordings.Course')),
            ],
            options={
                'db_table': 'course_session',
            },
        ),
        migrations.CreateModel(
            name='SessionReference',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=250, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'course_session_reference',
            },
        ),
        migrations.AlterModelOptions(
            name='classrecording',
            options={'ordering': ['session', 'class_date', '-class_part']},
        ),
        migrations.AlterField(
            model_name='classrecording',
            name='course',
            field=models.IntegerField(choices=[(1, 'Fall 2016'), (2, 'Spring 2017')]),
        ),
        migrations.AlterField(
            model_name='classrecording',
            name='name',
            field=models.CharField(blank=True, max_length=250, null=True),
        ),
        migrations.AddField(
            model_name='sessionreference',
            name='recording',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='recordings.ClassRecording'),
        ),
        migrations.AddField(
            model_name='sessionreference',
            name='session',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recordings.CourseSession'),
        ),
        migrations.AddField(
            model_name='codewarsproblem',
            name='recording',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='recordings.ClassRecording'),
        ),
        migrations.AddField(
            model_name='codewarsproblem',
            name='session',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recordings.CourseSession'),
        ),
        migrations.AddField(
            model_name='classrecording',
            name='session_fk',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='recordings.CourseSession'),
        ),
    ]
