text: # Generated by Django 3.0.8 on 2020-08-25 12:13
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Course',
              fields=[
                  ('cno', models.CharField(max_length=20, primary_key=True, serialize=False)),
                  ('cname', models.CharField(max_length=50)),
                  ('textBook', models.CharField(max_length=20)),
              ],
              options={
                  'db_table': 'course',
              },
          ),
          migrations.CreateModel(
              name='Department',
              fields=[
                  ('dno', models.CharField(max_length=20, primary_key=True, serialize=False)),
                  ('dname', models.CharField(max_length=50, unique=True)),
              ],
              options={
                  'db_table': 'department',
              },
          ),
          migrations.CreateModel(
              name='Teacher',
              fields=[
                  ('tno', models.CharField(max_length=20, primary_key=True, serialize=False)),
                  ('tname', models.CharField(max_length=50)),
                  ('tgender', models.CharField(max_length=20)),
                  ('jobtitle', models.CharField(max_length=20)),
              ],
              options={
                  'db_table': 'teacher',
              },
          ),
          migrations.CreateModel(
              name='TeachPlan',
              fields=[
                  ('tpno', models.CharField(max_length=20, primary_key=True, serialize=False)),
                  ('credit', models.FloatField()),
                  ('teach_date', models.DateField()),
                  ('evaluation_method', models.CharField(max_length=50)),
                  ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.Course')),
                  ('department', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.Department')),
                  ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.Teacher')),
              ],
              options={
                  'db_table': 'teachplan',
              },
          ),
          migrations.AddField(
              model_name='teacher',
              name='teachCourse',
              field=models.ManyToManyField(through='app1.TeachPlan', to='app1.Course'),
          ),
          migrations.CreateModel(
              name='Student',
              fields=[
                  ('sno', models.CharField(max_length=20, primary_key=True, serialize=False)),
                  ('sname', models.CharField(max_length=50)),
                  ('sgender', models.CharField(max_length=20)),
                  ('studentDepartment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.Department')),
              ],
              options={
                  'db_table': 'student',
              },
          ),
          migrations.CreateModel(
              name='Inventory',
              fields=[
                  ('ino', models.CharField(max_length=20, primary_key=True, serialize=False)),
                  ('select_date', models.DateField()),
                  ('student', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='app1.Student')),
                  ('teachPlan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.TeachPlan')),
                  ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app1.Teacher')),
              ],
              options={
                  'db_table': 'inventory',
              },
          ),
          migrations.AddField(
              model_name='course',
              name='departmentCourse',
              field=models.ManyToManyField(through='app1.TeachPlan', to='app1.Department'),
          ),
      ]
  