# Generated by Django 3.0.5 on 2020-04-08 02:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('projects', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Ethic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, default='', max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='EthicBoard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='EthicFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filetype', models.PositiveSmallIntegerField(choices=[(0, 'Proposal'), (1, 'Votum'), (2, 'Amendment')])),
                ('filehandle', models.FileField(upload_to=huscy.project_ethics.models.EthicFile.get_upload_path)),
                ('filename', models.CharField(max_length=255)),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('uploaded_by', models.CharField(editable=False, max_length=126)),
                ('ethic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_ethics.Ethic')),
            ],
        ),
        migrations.AddField(
            model_name='ethic',
            name='ethic_board',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='project_ethics.EthicBoard'),
        ),
        migrations.AddField(
            model_name='ethic',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project'),
        ),
    ]
