# Generated by Django 3.1.2 on 2020-10-18 21:22

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


class Migration(migrations.Migration):

    dependencies = [
        ('project_first_app', '0003_auto_20201018_2256'),
    ]

    operations = [
        migrations.CreateModel(
            name='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('brand', models.CharField(max_length=30)),
                ('model', models.CharField(max_length=60)),
                ('color', models.CharField(choices=[('bk', 'black'), ('w', 'white'), ('s', 'silver'), ('g', 'grey'), ('r', 'red'), ('y', 'yellow'), ('gn', 'green'), ('bl', 'blue'), ('bn', 'brown'), ('t', 'teal'), ('p', 'pink'), ('v', 'violet'), ('o', 'orange')], max_length=2)),
                ('number', models.CharField(max_length=6, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='License',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.IntegerField(unique=True)),
                ('date', models.DateField()),
                ('type', models.CharField(blank=True, choices=[], max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='Registration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_date', models.DateField()),
                ('end_date', models.DateField(null=True)),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_first_app.car')),
            ],
        ),
        migrations.RemoveField(
            model_name='exhibition',
            name='member',
        ),
        migrations.RemoveField(
            model_name='participate',
            name='dog',
        ),
        migrations.RemoveField(
            model_name='participate',
            name='exhibition',
        ),
        migrations.AddField(
            model_name='owner',
            name='birthday',
            field=models.DateField(null=True),
        ),
        migrations.DeleteModel(
            name='Dog',
        ),
        migrations.DeleteModel(
            name='Exhibition',
        ),
        migrations.DeleteModel(
            name='Participate',
        ),
        migrations.AddField(
            model_name='registration',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_first_app.owner'),
        ),
        migrations.AddField(
            model_name='license',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_first_app.owner'),
        ),
        migrations.AddField(
            model_name='owner',
            name='car',
            field=models.ManyToManyField(through='project_first_app.Registration', to='project_first_app.Car'),
        ),
    ]
