# Generated by Django 2.2.4 on 2019-08-05 17:13

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


class Migration(migrations.Migration):

    dependencies = [
        ('common', '0001_initial'),
        ('people', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Degree',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Degree')),
            ],
            options={
                'verbose_name': 'Degree',
                'verbose_name_plural': 'Degrees',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ScientificArea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'Scientific area',
                'verbose_name_plural': 'Scientific areas',
                'ordering': ['name'],
            },
        ),
        migrations.RenameField(
            model_name='person',
            old_name='joined_date',
            new_name='date_joined',
        ),
        migrations.RenameField(
            model_name='person',
            old_name='leave_date',
            new_name='date_left',
        ),
        migrations.CreateModel(
            name='AcademicCareer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('graduation_year', models.IntegerField(null=True)),
                ('degree', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='people.Degree')),
                ('field_of_study', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='people.ScientificArea', verbose_name='Field of Study')),
                ('institution', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='common.Institution', verbose_name='Institute')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='people.Person')),
            ],
            options={
                'verbose_name': 'Academic Career',
                'verbose_name_plural': 'Academic Careers',
                'ordering': ['-graduation_year'],
            },
        ),
    ]
