# Generated by Django 4.1.1 on 2022-09-22 15:22

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0009_delete_vesselalias'),
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=256)),
                ('shortcode', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='CrewMember',
            fields=[
                ('pin', models.IntegerField(primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=256)),
                ('last_name', models.CharField(max_length=256)),
                ('email', models.EmailField(max_length=254)),
                ('dob', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Moodle',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('url', models.URLField()),
                ('monitor', models.BooleanField(default=True)),
                ('backup', models.BooleanField(default=False)),
                ('vessel', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.vessel')),
            ],
        ),
        migrations.CreateModel(
            name='MoodleDatabase',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('host', models.CharField(max_length=256)),
                ('username', models.CharField(max_length=256)),
                ('password', models.CharField(max_length=256)),
                ('database', models.CharField(default='moodle', max_length=256)),
                ('instance', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.moodle')),
            ],
        ),
        migrations.CreateModel(
            name='CourseAssignment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.course')),
                ('crew', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.crewmember')),
                ('instance', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.moodle')),
            ],
        ),
    ]
