# Generated by Django 2.2.17 on 2021-02-13 21:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('library', '0019_asset_allocated'),
    ]

    operations = [
        migrations.CreateModel(
            name='Material',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tonality',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pitch', models.CharField(choices=[('C', 'C'), ('D', 'D'), ('E', 'E'), ('F', 'F'), ('G', 'G'), ('A', 'A'), ('B', 'B')], max_length=1)),
                ('acctype', models.CharField(choices=[('none', 'natural'), ('flat', 'flat'), ('sharp', 'sharp')], max_length=5)),
                ('mode', models.CharField(choices=[('maj', 'Major'), ('min', 'Minor')], max_length=4)),
                ('accidentals', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(7)])),
            ],
        ),
        migrations.AddField(
            model_name='entry',
            name='key',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='library.Tonality', verbose_name='Key of Work'),
        ),
        migrations.AddField(
            model_name='entry',
            name='material',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='library.Material'),
        ),
    ]
