<filename>apps/subject/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-23 15:11
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='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('old_code', models.CharField(db_index=True, max_length=10)),
                ('code_num', models.CharField(db_index=True, default=b'D', max_length=10)),
                ('type', models.CharField(max_length=12)),
                ('type_en', models.CharField(max_length=36)),
                ('title', models.CharField(db_index=True, max_length=100)),
                ('title_en', models.CharField(db_index=True, max_length=200)),
                ('summury', models.CharField(default=b'', max_length=4000)),
                ('grade_sum', models.IntegerField(default=0)),
                ('load_sum', models.IntegerField(default=0)),
                ('speech_sum', models.IntegerField(default=0)),
                ('total_sum', models.FloatField(default=0.0)),
                ('comment_num', models.IntegerField(default=0)),
                ('grade', models.FloatField(default=0.0)),
                ('load', models.FloatField(default=0.0)),
                ('speech', models.FloatField(default=0.0)),
                ('total', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='CourseFiltered',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, default=b'', max_length=100, unique=True)),
                ('courses', models.ManyToManyField(db_index=True, to='subject.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.IntegerField(db_index=True, primary_key=True, serialize=False)),
                ('num_id', models.CharField(db_index=True, max_length=4)),
                ('code', models.CharField(db_index=True, max_length=5)),
                ('name', models.CharField(db_index=True, max_length=60)),
                ('name_en', models.CharField(db_index=True, max_length=60, null=True)),
                ('visible', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(db_index=True, max_length=10)),
                ('old_code', models.CharField(db_index=True, max_length=10)),
                ('year', models.IntegerField(db_index=True)),
                ('semester', models.SmallIntegerField(db_index=True)),
                ('class_no', models.CharField(blank=True, max_length=4)),
                ('title', models.CharField(db_index=True, max_length=100)),
                ('title_en', models.CharField(db_index=True, max_length=200)),
                ('type', models.CharField(max_length=12)),
                ('type_en', models.CharField(max_length=36)),
                ('audience', models.IntegerField()),
                ('credit', models.IntegerField(default=3)),
                ('num_classes', models.IntegerField(default=3)),
                ('num_labs', models.IntegerField(default=0)),
                ('credit_au', models.IntegerField(default=0)),
                ('limit', models.IntegerField(default=0)),
                ('num_people', models.IntegerField(blank=True, default=0, null=True)),
                ('is_english', models.BooleanField()),
                ('deleted', models.BooleanField(default=False)),
                ('grade_sum', models.IntegerField(default=0)),
                ('load_sum', models.IntegerField(default=0)),
                ('speech_sum', models.IntegerField(default=0)),
                ('total_sum', models.FloatField(default=0.0)),
                ('grade', models.FloatField(default=0.0)),
                ('load', models.FloatField(default=0.0)),
                ('speech', models.FloatField(default=0.0)),
                ('total', models.FloatField(default=0.0)),
                ('comment_num', models.IntegerField(default=0)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lecture_course', to='subject.Course')),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subject.Department')),
            ],
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('professor_name', models.CharField(db_index=True, max_length=100)),
                ('professor_name_en', models.CharField(blank=True, max_length=100, null=True)),
                ('professor_id', models.IntegerField()),
                ('major', models.CharField(max_length=30)),
                ('grade_sum', models.IntegerField(default=0)),
                ('load_sum', models.IntegerField(default=0)),
                ('speech_sum', models.IntegerField(default=0)),
                ('total_sum', models.FloatField(default=0.0)),
                ('comment_num', models.IntegerField(default=0)),
                ('grade', models.FloatField(default=0.0)),
                ('load', models.FloatField(default=0.0)),
                ('speech', models.FloatField(default=0.0)),
                ('total', models.FloatField(default=0.0)),
                ('course_list', models.ManyToManyField(db_index=True, to='subject.Course')),
            ],
        ),
        migrations.AddField(
            model_name='lecture',
            name='professor',
            field=models.ManyToManyField(blank=True, related_name='lecture_professor', to='subject.Professor'),
        ),
        migrations.AddField(
            model_name='course',
            name='department',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subject.Department'),
        ),
        migrations.AddField(
            model_name='course',
            name='professors',
            field=models.ManyToManyField(db_index=True, to='subject.Professor'),
        ),
    ]

<filename>apps/subject/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-23 15:11
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='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('old_code', models.CharField(db_index=True, max_length=10)),
                ('code_num', models.CharField(db_index=True, default=b'D', max_length=10)),
                ('type', models.CharField(max_length=12)),
                ('type_en', models.CharField(max_length=36)),
                ('title', models.CharField(db_index=True, max_length=100)),
                ('title_en', models.CharField(db_index=True, max_length=200)),
                ('summury', models.CharField(default=b'', max_length=4000)),
                ('grade_sum', models.IntegerField(default=0)),
                ('load_sum', models.IntegerField(default=0)),
                ('speech_sum', models.IntegerField(default=0)),
                ('total_sum', models.FloatField(default=0.0)),
                ('comment_num', models.IntegerField(default=0)),
                ('grade', models.FloatField(default=0.0)),
                ('load', models.FloatField(default=0.0)),
                ('speech', models.FloatField(default=0.0)),
                ('total', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='CourseFiltered',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(db_index=True, default=b'', max_length=100, unique=True)),
                ('courses', models.ManyToManyField(db_index=True, to='subject.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.IntegerField(db_index=True, primary_key=True, serialize=False)),
                ('num_id', models.CharField(db_index=True, max_length=4)),
                ('code', models.CharField(db_index=True, max_length=5)),
                ('name', models.CharField(db_index=True, max_length=60)),
                ('name_en', models.CharField(db_index=True, max_length=60, null=True)),
                ('visible', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(db_index=True, max_length=10)),
                ('old_code', models.CharField(db_index=True, max_length=10)),
                ('year', models.IntegerField(db_index=True)),
                ('semester', models.SmallIntegerField(db_index=True)),
                ('class_no', models.CharField(blank=True, max_length=4)),
                ('title', models.CharField(db_index=True, max_length=100)),
                ('title_en', models.CharField(db_index=True, max_length=200)),
                ('type', models.CharField(max_length=12)),
                ('type_en', models.CharField(max_length=36)),
                ('audience', models.IntegerField()),
                ('credit', models.IntegerField(default=3)),
                ('num_classes', models.IntegerField(default=3)),
                ('num_labs', models.IntegerField(default=0)),
                ('credit_au', models.IntegerField(default=0)),
                ('limit', models.IntegerField(default=0)),
                ('num_people', models.IntegerField(blank=True, default=0, null=True)),
                ('is_english', models.BooleanField()),
                ('deleted', models.BooleanField(default=False)),
                ('grade_sum', models.IntegerField(default=0)),
                ('load_sum', models.IntegerField(default=0)),
                ('speech_sum', models.IntegerField(default=0)),
                ('total_sum', models.FloatField(default=0.0)),
                ('grade', models.FloatField(default=0.0)),
                ('load', models.FloatField(default=0.0)),
                ('speech', models.FloatField(default=0.0)),
                ('total', models.FloatField(default=0.0)),
                ('comment_num', models.IntegerField(default=0)),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lecture_course', to='subject.Course')),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subject.Department')),
            ],
        ),
        migrations.CreateModel(
            name='Professor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('professor_name', models.CharField(db_index=True, max_length=100)),
                ('professor_name_en', models.CharField(blank=True, max_length=100, null=True)),
                ('professor_id', models.IntegerField()),
                ('major', models.CharField(max_length=30)),
                ('grade_sum', models.IntegerField(default=0)),
                ('load_sum', models.IntegerField(default=0)),
                ('speech_sum', models.IntegerField(default=0)),
                ('total_sum', models.FloatField(default=0.0)),
                ('comment_num', models.IntegerField(default=0)),
                ('grade', models.FloatField(default=0.0)),
                ('load', models.FloatField(default=0.0)),
                ('speech', models.FloatField(default=0.0)),
                ('total', models.FloatField(default=0.0)),
                ('course_list', models.ManyToManyField(db_index=True, to='subject.Course')),
            ],
        ),
        migrations.AddField(
            model_name='lecture',
            name='professor',
            field=models.ManyToManyField(blank=True, related_name='lecture_professor', to='subject.Professor'),
        ),
        migrations.AddField(
            model_name='course',
            name='department',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subject.Department'),
        ),
        migrations.AddField(
            model_name='course',
            name='professors',
            field=models.ManyToManyField(db_index=True, to='subject.Professor'),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-09-23 15:11