# Generated by Django 2.0.6 on 2018-08-10 03:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Relation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
                ('age', models.IntegerField()),
                ('sex', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
                ('stu', models.ManyToManyField(through='manytomanyapp.Relation', to='manytomanyapp.Student')),
            ],
        ),
        migrations.AddField(
            model_name='relation',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='manytomanyapp.Student'),
        ),
        migrations.AddField(
            model_name='relation',
            name='subject',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='manytomanyapp.Subject'),
        ),
    ]
