# Generated by Django 2.1.7 on 2019-03-28 20:31

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Name of this study')),
                ('period', models.CharField(choices=[('Q1', 'Quartile 1'), ('Q2', 'Quartile 2'), ('Q3', 'Quartile 3'), ('Q4', 'Quartile 4'), ('Q5', 'Quartile 5 (sad summer students)'), ('Q1_HALF', 'Quartile 1, half year course'), ('Q3_HALF', 'Quartile 3, half year course'), ('FULL_YEAR', 'Full year course')], max_length=32, verbose_name='The period in the year for this course')),
                ('calendar_year', models.IntegerField(verbose_name='The year in which this course takes place')),
            ],
        ),
        migrations.CreateModel(
            name='CourseStudy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('study_year', models.IntegerField()),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='steambird.Course')),
            ],
        ),
        migrations.CreateModel(
            name='MSP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='MSPLine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('request_material', 'REQUEST_MATERIAL'), ('set_available_materials', 'SET_AVAILABLE_MATERIALS'), ('approve_material', 'APPROVE_MATERIAL')], max_length=23, verbose_name='Mutation type')),
                ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['time'],
            },
        ),
        migrations.CreateModel(
            name='Study',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('bachelor', 'BACHELOR'), ('master', 'MASTER'), ('premaster', 'PREMASTER')], max_length=9, verbose_name='Type of this study')),
                ('slug', models.SlugField(verbose_name='Abbreviation of the study association')),
            ],
        ),
        migrations.CreateModel(
            name='StudyAssociation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='Name of this association')),
                ('studies', models.ManyToManyField(to='steambird.Study', verbose_name='The studies this association is affiliated with')),
                ('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='All the users that can manage books on behalf of this organization')),
            ],
            options={
                'verbose_name': 'Association',
                'verbose_name_plural': 'Associations',
            },
        ),
        migrations.CreateModel(
            name='StudyMaterial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Category name of this article')),
            ],
            options={
                'verbose_name': 'Study Material',
                'verbose_name_plural': 'Study Materials',
            },
        ),
        migrations.CreateModel(
            name='StudyMaterialEdition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name of the material')),
            ],
            options={
                'verbose_name': 'StudyMaterial Edition',
                'verbose_name_plural': 'StudyMaterials Editions',
            },
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titles', models.CharField(max_length=50, verbose_name='Academic titles')),
                ('initials', models.CharField(max_length=15, verbose_name='Initials')),
                ('first_name', models.CharField(max_length=50, verbose_name='First name')),
                ('surname_prefix', models.CharField(blank=True, max_length=50, null=True, verbose_name='Surname prefix')),
                ('last_name', models.CharField(max_length=50, verbose_name='Last name')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('active', models.BooleanField(default=True, verbose_name='Active')),
                ('retired', models.BooleanField(default=False, verbose_name='Retired')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='Time of last login')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='The user associated to this')),
            ],
            options={
                'verbose_name': 'Teacher',
                'verbose_name_plural': 'Teachers',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('studymaterialedition_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='steambird.StudyMaterialEdition')),
                ('ISBN', models.CharField(max_length=13, unique=True, verbose_name='ISBN 10 or ISBN 13')),
                ('author', models.CharField(max_length=1000, verbose_name='Author names, comma separated')),
                ('img', models.URLField(blank=True, null=True, verbose_name='Link to cover image of book')),
                ('year_of_publishing', models.IntegerField(verbose_name='Year this revision of the book was published.')),
            ],
            options={
                'verbose_name': 'Book',
                'verbose_name_plural': 'Books',
            },
            bases=('steambird.studymaterialedition',),
        ),
        migrations.CreateModel(
            name='OtherMaterial',
            fields=[
                ('studymaterialedition_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='steambird.StudyMaterialEdition')),
            ],
            options={
                'verbose_name': 'Other Material',
                'verbose_name_plural': 'Other Materials',
            },
            bases=('steambird.studymaterialedition',),
        ),
        migrations.CreateModel(
            name='ScientificArticle',
            fields=[
                ('studymaterialedition_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='steambird.StudyMaterialEdition')),
                ('DOI', models.CharField(blank=True, max_length=255, verbose_name='Digital Object Identifier')),
                ('author', models.CharField(max_length=1000, verbose_name='Author names, comma separated')),
                ('year_of_publishing', models.IntegerField(verbose_name='Year this revision of the book was published.')),
            ],
            options={
                'verbose_name': 'Scientific Article',
                'verbose_name_plural': 'Scientific Articles',
            },
            bases=('steambird.studymaterialedition',),
        ),
        migrations.AddField(
            model_name='studymaterialedition',
            name='material_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='steambird.StudyMaterial', verbose_name='Material collection'),
        ),
        migrations.AddField(
            model_name='studymaterialedition',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_steambird.studymaterialedition_set+', to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='mspline',
            name='materials',
            field=models.ManyToManyField(blank=True, to='steambird.StudyMaterialEdition', verbose_name='Related study material(s)'),
        ),
        migrations.AddField(
            model_name='mspline',
            name='msp',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='steambird.MSP', verbose_name='Parent of this line'),
        ),
        migrations.AddField(
            model_name='msp',
            name='teachers',
            field=models.ManyToManyField(blank=True, to='steambird.Teacher', verbose_name='Teachers assigned to manage this book process'),
        ),
        migrations.AddField(
            model_name='coursestudy',
            name='study',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='steambird.Study'),
        ),
        migrations.AddField(
            model_name='course',
            name='coordinator',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coordinated_courses', to='steambird.Teacher', verbose_name='Coordinator of this course'),
        ),
        migrations.AddField(
            model_name='course',
            name='materials',
            field=models.ManyToManyField(blank=True, to='steambird.MSP', verbose_name='Materials that are required by this study'),
        ),
        migrations.AddField(
            model_name='course',
            name='studies',
            field=models.ManyToManyField(blank=True, through='steambird.CourseStudy', to='steambird.Study', verbose_name='Studies this course belong to'),
        ),
        migrations.AddField(
            model_name='course',
            name='sub_courses',
            field=models.ManyToManyField(blank=True, related_name='parent_courses', to='steambird.Course', verbose_name='Sub-courses for this course.'),
        ),
        migrations.AddField(
            model_name='course',
            name='teachers',
            field=models.ManyToManyField(blank=True, related_name='teaches_courses', to='steambird.Teacher', verbose_name='Teachers of this course'),
        ),
    ]

593033c0903a3618eb68ddcc59c11ad826c857d3
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    initial = True
    dependencies = [('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Course', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=64,
        verbose_name='Name of this study')), ('period', models.CharField(
        choices=[('Q1', 'Quartile 1'), ('Q2', 'Quartile 2'), ('Q3',
        'Quartile 3'), ('Q4', 'Quartile 4'), ('Q5',
        'Quartile 5 (sad summer students)'), ('Q1_HALF',
        'Quartile 1, half year course'), ('Q3_HALF',
        'Quartile 3, half year course'), ('FULL_YEAR', 'Full year course')],
        max_length=32, verbose_name=
        'The period in the year for this course')), ('calendar_year',
        models.IntegerField(verbose_name=
        'The year in which this course takes place'))]), migrations.
        CreateModel(name='CourseStudy', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('study_year', models.IntegerField()), ('course', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'steambird.Course'))]), migrations.CreateModel(name='MSP', fields=[
        ('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID'))]), migrations.CreateModel(name
        ='MSPLine', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('type',
        models.CharField(choices=[('request_material', 'REQUEST_MATERIAL'),
        ('set_available_materials', 'SET_AVAILABLE_MATERIALS'), (
        'approve_material', 'APPROVE_MATERIAL')], max_length=23,
        verbose_name='Mutation type')), ('comment', models.TextField(blank=
        True, null=True, verbose_name='Comment')), ('time', models.
        DateTimeField(auto_now_add=True))], options={'ordering': ['time']}),
        migrations.CreateModel(name='Study', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('type', models.CharField(choices=[('bachelor',
        'BACHELOR'), ('master', 'MASTER'), ('premaster', 'PREMASTER')],
        max_length=9, verbose_name='Type of this study')), ('slug', models.
        SlugField(verbose_name='Abbreviation of the study association'))]),
        migrations.CreateModel(name='StudyAssociation', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=
        128, verbose_name='Name of this association')), ('studies', models.
        ManyToManyField(to='steambird.Study', verbose_name=
        'The studies this association is affiliated with')), ('users',
        models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name=
        'All the users that can manage books on behalf of this organization'
        ))], options={'verbose_name': 'Association', 'verbose_name_plural':
        'Associations'}), migrations.CreateModel(name='StudyMaterial',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=255, verbose_name='Category name of this article'))],
        options={'verbose_name': 'Study Material', 'verbose_name_plural':
        'Study Materials'}), migrations.CreateModel(name=
        'StudyMaterialEdition', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('name', models.CharField(max_length=255, verbose_name=
        'Name of the material'))], options={'verbose_name':
        'StudyMaterial Edition', 'verbose_name_plural':
        'StudyMaterials Editions'}), migrations.CreateModel(name='Teacher',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('titles', models.CharField(
        max_length=50, verbose_name='Academic titles')), ('initials',
        models.CharField(max_length=15, verbose_name='Initials')), (
        'first_name', models.CharField(max_length=50, verbose_name=
        'First name')), ('surname_prefix', models.CharField(blank=True,
        max_length=50, null=True, verbose_name='Surname prefix')), (
        'last_name', models.CharField(max_length=50, verbose_name=
        'Last name')), ('email', models.EmailField(max_length=254,
        verbose_name='Email')), ('active', models.BooleanField(default=True,
        verbose_name='Active')), ('retired', models.BooleanField(default=
        False, verbose_name='Retired')), ('last_login', models.
        DateTimeField(blank=True, null=True, verbose_name=
        'Time of last login')), ('user', models.ForeignKey(on_delete=django
        .db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL,
        verbose_name='The user associated to this'))], options={
        'verbose_name': 'Teacher', 'verbose_name_plural': 'Teachers'}),
        migrations.CreateModel(name='Book', fields=[(
        'studymaterialedition_ptr', models.OneToOneField(auto_created=True,
        on_delete=django.db.models.deletion.CASCADE, parent_link=True,
        primary_key=True, serialize=False, to=
        'steambird.StudyMaterialEdition')), ('ISBN', models.CharField(
        max_length=13, unique=True, verbose_name='ISBN 10 or ISBN 13')), (
        'author', models.CharField(max_length=1000, verbose_name=
        'Author names, comma separated')), ('img', models.URLField(blank=
        True, null=True, verbose_name='Link to cover image of book')), (
        'year_of_publishing', models.IntegerField(verbose_name=
        'Year this revision of the book was published.'))], options={
        'verbose_name': 'Book', 'verbose_name_plural': 'Books'}, bases=(
        'steambird.studymaterialedition',)), migrations.CreateModel(name=
        'OtherMaterial', fields=[('studymaterialedition_ptr', models.
        OneToOneField(auto_created=True, on_delete=django.db.models.
        deletion.CASCADE, parent_link=True, primary_key=True, serialize=
        False, to='steambird.StudyMaterialEdition'))], options={
        'verbose_name': 'Other Material', 'verbose_name_plural':
        'Other Materials'}, bases=('steambird.studymaterialedition',)),
        migrations.CreateModel(name='ScientificArticle', fields=[(
        'studymaterialedition_ptr', models.OneToOneField(auto_created=True,
        on_delete=django.db.models.deletion.CASCADE, parent_link=True,
        primary_key=True, serialize=False, to=
        'steambird.StudyMaterialEdition')), ('DOI', models.CharField(blank=
        True, max_length=255, verbose_name='Digital Object Identifier')), (
        'author', models.CharField(max_length=1000, verbose_name=
        'Author names, comma separated')), ('year_of_publishing', models.
        IntegerField(verbose_name=
        'Year this revision of the book was published.'))], options={
        'verbose_name': 'Scientific Article', 'verbose_name_plural':
        'Scientific Articles'}, bases=('steambird.studymaterialedition',)),
        migrations.AddField(model_name='studymaterialedition', name=
        'material_type', field=models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.DO_NOTHING, to=
        'steambird.StudyMaterial', verbose_name='Material collection')),
        migrations.AddField(model_name='studymaterialedition', name=
        'polymorphic_ctype', field=models.ForeignKey(editable=False, null=
        True, on_delete=django.db.models.deletion.CASCADE, related_name=
        'polymorphic_steambird.studymaterialedition_set+', to=
        'contenttypes.ContentType')), migrations.AddField(model_name=
        'mspline', name='materials', field=models.ManyToManyField(blank=
        True, to='steambird.StudyMaterialEdition', verbose_name=
        'Related study material(s)')), migrations.AddField(model_name=
        'mspline', name='msp', field=models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, to='steambird.MSP', verbose_name=
        'Parent of this line')), migrations.AddField(model_name='msp', name
        ='teachers', field=models.ManyToManyField(blank=True, to=
        'steambird.Teacher', verbose_name=
        'Teachers assigned to manage this book process')), migrations.
        AddField(model_name='coursestudy', name='study', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'steambird.Study')), migrations.AddField(model_name='course', name=
        'coordinator', field=models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.PROTECT, related_name=
        'coordinated_courses', to='steambird.Teacher', verbose_name=
        'Coordinator of this course')), migrations.AddField(model_name=
        'course', name='materials', field=models.ManyToManyField(blank=True,
        to='steambird.MSP', verbose_name=
        'Materials that are required by this study')), migrations.AddField(
        model_name='course', name='studies', field=models.ManyToManyField(
        blank=True, through='steambird.CourseStudy', to='steambird.Study',
        verbose_name='Studies this course belong to')), migrations.AddField
        (model_name='course', name='sub_courses', field=models.
        ManyToManyField(blank=True, related_name='parent_courses', to=
        'steambird.Course', verbose_name='Sub-courses for this course.')),
        migrations.AddField(model_name='course', name='teachers', field=
        models.ManyToManyField(blank=True, related_name='teaches_courses',
        to='steambird.Teacher', verbose_name='Teachers of this course'))]

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


class Migration(migrations.Migration):
    initial = True
    dependencies = [('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Course', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=64,
        verbose_name='Name of this study')), ('period', models.CharField(
        choices=[('Q1', 'Quartile 1'), ('Q2', 'Quartile 2'), ('Q3',
        'Quartile 3'), ('Q4', 'Quartile 4'), ('Q5',
        'Quartile 5 (sad summer students)'), ('Q1_HALF',
        'Quartile 1, half year course'), ('Q3_HALF',
        'Quartile 3, half year course'), ('FULL_YEAR', 'Full year course')],
        max_length=32, verbose_name=
        'The period in the year for this course')), ('calendar_year',
        models.IntegerField(verbose_name=
        'The year in which this course takes place'))]), migrations.
        CreateModel(name='CourseStudy', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('study_year', models.IntegerField()), ('course', models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'steambird.Course'))]), migrations.CreateModel(name='MSP', fields=[
        ('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID'))]), migrations.CreateModel(name
        ='MSPLine', fields=[('id', models.AutoField(auto_created=True,
        primary_key=True, serialize=False, verbose_name='ID')), ('type',
        models.CharField(choices=[('request_material', 'REQUEST_MATERIAL'),
        ('set_available_materials', 'SET_AVAILABLE_MATERIALS'), (
        'approve_material', 'APPROVE_MATERIAL')], max_length=23,
        verbose_name='Mutation type')), ('comment', models.TextField(blank=
        True, null=True, verbose_name='Comment')), ('time', models.
        DateTimeField(auto_now_add=True))], options={'ordering': ['time']}),
        migrations.CreateModel(name='Study', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('type', models.CharField(choices=[('bachelor',
        'BACHELOR'), ('master', 'MASTER'), ('premaster', 'PREMASTER')],
        max_length=9, verbose_name='Type of this study')), ('slug', models.
        SlugField(verbose_name='Abbreviation of the study association'))]),
        migrations.CreateModel(name='StudyAssociation', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('name', models.CharField(max_length=
        128, verbose_name='Name of this association')), ('studies', models.
        ManyToManyField(to='steambird.Study', verbose_name=
        'The studies this association is affiliated with')), ('users',
        models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name=
        'All the users that can manage books on behalf of this organization'
        ))], options={'verbose_name': 'Association', 'verbose_name_plural':
        'Associations'}), migrations.CreateModel(name='StudyMaterial',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=255, verbose_name='Category name of this article'))],
        options={'verbose_name': 'Study Material', 'verbose_name_plural':
        'Study Materials'}), migrations.CreateModel(name=
        'StudyMaterialEdition', fields=[('id', models.AutoField(
        auto_created=True, primary_key=True, serialize=False, verbose_name=
        'ID')), ('name', models.CharField(max_length=255, verbose_name=
        'Name of the material'))], options={'verbose_name':
        'StudyMaterial Edition', 'verbose_name_plural':
        'StudyMaterials Editions'}), migrations.CreateModel(name='Teacher',
        fields=[('id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('titles', models.CharField(
        max_length=50, verbose_name='Academic titles')), ('initials',
        models.CharField(max_length=15, verbose_name='Initials')), (
        'first_name', models.CharField(max_length=50, verbose_name=
        'First name')), ('surname_prefix', models.CharField(blank=True,
        max_length=50, null=True, verbose_name='Surname prefix')), (
        'last_name', models.CharField(max_length=50, verbose_name=
        'Last name')), ('email', models.EmailField(max_length=254,
        verbose_name='Email')), ('active', models.BooleanField(default=True,
        verbose_name='Active')), ('retired', models.BooleanField(default=
        False, verbose_name='Retired')), ('last_login', models.
        DateTimeField(blank=True, null=True, verbose_name=
        'Time of last login')), ('user', models.ForeignKey(on_delete=django
        .db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL,
        verbose_name='The user associated to this'))], options={
        'verbose_name': 'Teacher', 'verbose_name_plural': 'Teachers'}),
        migrations.CreateModel(name='Book', fields=[(
        'studymaterialedition_ptr', models.OneToOneField(auto_created=True,
        on_delete=django.db.models.deletion.CASCADE, parent_link=True,
        primary_key=True, serialize=False, to=
        'steambird.StudyMaterialEdition')), ('ISBN', models.CharField(
        max_length=13, unique=True, verbose_name='ISBN 10 or ISBN 13')), (
        'author', models.CharField(max_length=1000, verbose_name=
        'Author names, comma separated')), ('img', models.URLField(blank=
        True, null=True, verbose_name='Link to cover image of book')), (
        'year_of_publishing', models.IntegerField(verbose_name=
        'Year this revision of the book was published.'))], options={
        'verbose_name': 'Book', 'verbose_name_plural': 'Books'}, bases=(
        'steambird.studymaterialedition',)), migrations.CreateModel(name=
        'OtherMaterial', fields=[('studymaterialedition_ptr', models.
        OneToOneField(auto_created=True, on_delete=django.db.models.
        deletion.CASCADE, parent_link=True, primary_key=True, serialize=
        False, to='steambird.StudyMaterialEdition'))], options={
        'verbose_name': 'Other Material', 'verbose_name_plural':
        'Other Materials'}, bases=('steambird.studymaterialedition',)),
        migrations.CreateModel(name='ScientificArticle', fields=[(
        'studymaterialedition_ptr', models.OneToOneField(auto_created=True,
        on_delete=django.db.models.deletion.CASCADE, parent_link=True,
        primary_key=True, serialize=False, to=
        'steambird.StudyMaterialEdition')), ('DOI', models.CharField(blank=
        True, max_length=255, verbose_name='Digital Object Identifier')), (
        'author', models.CharField(max_length=1000, verbose_name=
        'Author names, comma separated')), ('year_of_publishing', models.
        IntegerField(verbose_name=
        'Year this revision of the book was published.'))], options={
        'verbose_name': 'Scientific Article', 'verbose_name_plural':
        'Scientific Articles'}, bases=('steambird.studymaterialedition',)),
        migrations.AddField(model_name='studymaterialedition', name=
        'material_type', field=models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.DO_NOTHING, to=
        'steambird.StudyMaterial', verbose_name='Material collection')),
        migrations.AddField(model_name='studymaterialedition', name=
        'polymorphic_ctype', field=models.ForeignKey(editable=False, null=
        True, on_delete=django.db.models.deletion.CASCADE, related_name=
        'polymorphic_steambird.studymaterialedition_set+', to=
        'contenttypes.ContentType')), migrations.AddField(model_name=
        'mspline', name='materials', field=models.ManyToManyField(blank=
        True, to='steambird.StudyMaterialEdition', verbose_name=
        'Related study material(s)')), migrations.AddField(model_name=
        'mspline', name='msp', field=models.ForeignKey(on_delete=django.db.
        models.deletion.CASCADE, to='steambird.MSP', verbose_name=
        'Parent of this line')), migrations.AddField(model_name='msp', name
        ='teachers', field=models.ManyToManyField(blank=True, to=
        'steambird.Teacher', verbose_name=
        'Teachers assigned to manage this book process')), migrations.
        AddField(model_name='coursestudy', name='study', field=models.
        ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=
        'steambird.Study')), migrations.AddField(model_name='course', name=
        'coordinator', field=models.ForeignKey(blank=True, null=True,
        on_delete=django.db.models.deletion.PROTECT, related_name=
        'coordinated_courses', to='steambird.Teacher', verbose_name=
        'Coordinator of this course')), migrations.AddField(model_name=
        'course', name='materials', field=models.ManyToManyField(blank=True,
        to='steambird.MSP', verbose_name=
        'Materials that are required by this study')), migrations.AddField(
        model_name='course', name='studies', field=models.ManyToManyField(
        blank=True, through='steambird.CourseStudy', to='steambird.Study',
        verbose_name='Studies this course belong to')), migrations.AddField
        (model_name='course', name='sub_courses', field=models.
        ManyToManyField(blank=True, related_name='parent_courses', to=
        'steambird.Course', verbose_name='Sub-courses for this course.')),
        migrations.AddField(model_name='course', name='teachers', field=
        models.ManyToManyField(blank=True, related_name='teaches_courses',
        to='steambird.Teacher', verbose_name='Teachers of this course'))]

# Generated by Django 2.1.7 on 2019-03-28 20:31

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Name of this study')),
                ('period', models.CharField(choices=[('Q1', 'Quartile 1'), ('Q2', 'Quartile 2'), ('Q3', 'Quartile 3'), ('Q4', 'Quartile 4'), ('Q5', 'Quartile 5 (sad summer students)'), ('Q1_HALF', 'Quartile 1, half year course'), ('Q3_HALF', 'Quartile 3, half year course'), ('FULL_YEAR', 'Full year course')], max_length=32, verbose_name='The period in the year for this course')),
                ('calendar_year', models.IntegerField(verbose_name='The year in which this course takes place')),
            ],
        ),
        migrations.CreateModel(
            name='CourseStudy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('study_year', models.IntegerField()),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='steambird.Course')),
            ],
        ),
        migrations.CreateModel(
            name='MSP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='MSPLine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('request_material', 'REQUEST_MATERIAL'), ('set_available_materials', 'SET_AVAILABLE_MATERIALS'), ('approve_material', 'APPROVE_MATERIAL')], max_length=23, verbose_name='Mutation type')),
                ('comment', models.TextField(blank=True, null=True, verbose_name='Comment')),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['time'],
            },
        ),
        migrations.CreateModel(
            name='Study',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('bachelor', 'BACHELOR'), ('master', 'MASTER'), ('premaster', 'PREMASTER')], max_length=9, verbose_name='Type of this study')),
                ('slug', models.SlugField(verbose_name='Abbreviation of the study association')),
            ],
        ),
        migrations.CreateModel(
            name='StudyAssociation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='Name of this association')),
                ('studies', models.ManyToManyField(to='steambird.Study', verbose_name='The studies this association is affiliated with')),
                ('users', models.ManyToManyField(to=settings.AUTH_USER_MODEL, verbose_name='All the users that can manage books on behalf of this organization')),
            ],
            options={
                'verbose_name': 'Association',
                'verbose_name_plural': 'Associations',
            },
        ),
        migrations.CreateModel(
            name='StudyMaterial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Category name of this article')),
            ],
            options={
                'verbose_name': 'Study Material',
                'verbose_name_plural': 'Study Materials',
            },
        ),
        migrations.CreateModel(
            name='StudyMaterialEdition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name of the material')),
            ],
            options={
                'verbose_name': 'StudyMaterial Edition',
                'verbose_name_plural': 'StudyMaterials Editions',
            },
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titles', models.CharField(max_length=50, verbose_name='Academic titles')),
                ('initials', models.CharField(max_length=15, verbose_name='Initials')),
                ('first_name', models.CharField(max_length=50, verbose_name='First name')),
                ('surname_prefix', models.CharField(blank=True, max_length=50, null=True, verbose_name='Surname prefix')),
                ('last_name', models.CharField(max_length=50, verbose_name='Last name')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('active', models.BooleanField(default=True, verbose_name='Active')),
                ('retired', models.BooleanField(default=False, verbose_name='Retired')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='Time of last login')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='The user associated to this')),
            ],
            options={
                'verbose_name': 'Teacher',
                'verbose_name_plural': 'Teachers',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('studymaterialedition_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='steambird.StudyMaterialEdition')),
                ('ISBN', models.CharField(max_length=13, unique=True, verbose_name='ISBN 10 or ISBN 13')),
                ('author', models.CharField(max_length=1000, verbose_name='Author names, comma separated')),
                ('img', models.URLField(blank=True, null=True, verbose_name='Link to cover image of book')),
                ('year_of_publishing', models.IntegerField(verbose_name='Year this revision of the book was published.')),
            ],
            options={
                'verbose_name': 'Book',
                'verbose_name_plural': 'Books',
            },
            bases=('steambird.studymaterialedition',),
        ),
        migrations.CreateModel(
            name='OtherMaterial',
            fields=[
                ('studymaterialedition_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='steambird.StudyMaterialEdition')),
            ],
            options={
                'verbose_name': 'Other Material',
                'verbose_name_plural': 'Other Materials',
            },
            bases=('steambird.studymaterialedition',),
        ),
        migrations.CreateModel(
            name='ScientificArticle',
            fields=[
                ('studymaterialedition_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='steambird.StudyMaterialEdition')),
                ('DOI', models.CharField(blank=True, max_length=255, verbose_name='Digital Object Identifier')),
                ('author', models.CharField(max_length=1000, verbose_name='Author names, comma separated')),
                ('year_of_publishing', models.IntegerField(verbose_name='Year this revision of the book was published.')),
            ],
            options={
                'verbose_name': 'Scientific Article',
                'verbose_name_plural': 'Scientific Articles',
            },
            bases=('steambird.studymaterialedition',),
        ),
        migrations.AddField(
            model_name='studymaterialedition',
            name='material_type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='steambird.StudyMaterial', verbose_name='Material collection'),
        ),
        migrations.AddField(
            model_name='studymaterialedition',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_steambird.studymaterialedition_set+', to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='mspline',
            name='materials',
            field=models.ManyToManyField(blank=True, to='steambird.StudyMaterialEdition', verbose_name='Related study material(s)'),
        ),
        migrations.AddField(
            model_name='mspline',
            name='msp',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='steambird.MSP', verbose_name='Parent of this line'),
        ),
        migrations.AddField(
            model_name='msp',
            name='teachers',
            field=models.ManyToManyField(blank=True, to='steambird.Teacher', verbose_name='Teachers assigned to manage this book process'),
        ),
        migrations.AddField(
            model_name='coursestudy',
            name='study',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='steambird.Study'),
        ),
        migrations.AddField(
            model_name='course',
            name='coordinator',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='coordinated_courses', to='steambird.Teacher', verbose_name='Coordinator of this course'),
        ),
        migrations.AddField(
            model_name='course',
            name='materials',
            field=models.ManyToManyField(blank=True, to='steambird.MSP', verbose_name='Materials that are required by this study'),
        ),
        migrations.AddField(
            model_name='course',
            name='studies',
            field=models.ManyToManyField(blank=True, through='steambird.CourseStudy', to='steambird.Study', verbose_name='Studies this course belong to'),
        ),
        migrations.AddField(
            model_name='course',
            name='sub_courses',
            field=models.ManyToManyField(blank=True, related_name='parent_courses', to='steambird.Course', verbose_name='Sub-courses for this course.'),
        ),
        migrations.AddField(
            model_name='course',
            name='teachers',
            field=models.ManyToManyField(blank=True, related_name='teaches_courses', to='steambird.Teacher', verbose_name='Teachers of this course'),
        ),
    ]
