# Generated by Django 2.0.3 on 2019-11-06 07:14

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_liked', models.BooleanField(default=True)),
            ],
            options={
                'db_table': 'like',
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pid', models.CharField(max_length=20)),
                ('fname', models.CharField(max_length=20)),
                ('lname', models.CharField(max_length=20)),
                ('password', models.CharField(max_length=20)),
                ('is_prof', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'person',
            },
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sub_code', models.CharField(max_length=5)),
                ('sub_name', models.CharField(max_length=100)),
                ('sub_detail', models.CharField(max_length=500)),
                ('prof', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Person')),
            ],
            options={
                'db_table': 'subject',
            },
        ),
        migrations.CreateModel(
            name='Subject_Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Person')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Subject')),
            ],
            options={
                'db_table': 'subject_student',
            },
        ),
        migrations.CreateModel(
            name='Thread',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('msg', models.CharField(max_length=500)),
                ('likes', models.IntegerField(default=0)),
                ('dislikes', models.IntegerField(default=0)),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Person')),
            ],
            options={
                'db_table': 'thread',
            },
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('is_prof_included', models.BooleanField(default=True)),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Subject')),
            ],
            options={
                'db_table': 'topic',
            },
        ),
        migrations.AddField(
            model_name='thread',
            name='topic',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Topic'),
        ),
        migrations.AddField(
            model_name='like',
            name='person',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Person'),
        ),
        migrations.AddField(
            model_name='like',
            name='thread',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='discussion.Thread'),
        ),
    ]
