# Generated by Django 2.2.1 on 2019-11-26 20:42

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('course_id', models.CharField(max_length=10, primary_key=True, serialize=False)),
                ('units', models.IntegerField(validators=[scraper.models.validate_credit_hours])),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('name', models.CharField(default='DEFAULT', max_length=50, primary_key=True, serialize=False)),
                ('url', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('name', models.CharField(default='DEFAULT', max_length=50, primary_key=True, serialize=False)),
                ('url', models.CharField(max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('watched_classes', models.ManyToManyField(to='scraper.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Instructor',
            fields=[
                ('name', models.CharField(default='DEFAULT', max_length=30, primary_key=True, serialize=False)),
                ('dept', models.ForeignKey(default='DEFAULT', on_delete=django.db.models.deletion.SET_DEFAULT, to='scraper.Department')),
            ],
        ),
        migrations.AddField(
            model_name='department',
            name='school',
            field=models.ForeignKey(default='DEFAULT', on_delete=django.db.models.deletion.SET_DEFAULT, to='scraper.School'),
        ),
        migrations.AddField(
            model_name='course',
            name='dept',
            field=models.ForeignKey(default='DEFAULT', on_delete=django.db.models.deletion.SET_DEFAULT, to='scraper.Department'),
        ),
        migrations.AddField(
            model_name='course',
            name='instructor',
            field=models.ForeignKey(default='DEFAULT', on_delete=django.db.models.deletion.SET_DEFAULT, to='scraper.Instructor'),
        ),
    ]
