# Generated by Django 3.2.1 on 2021-05-04 15:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Section',
            fields=[
                ('code', models.CharField(max_length=1, primary_key=True, serialize=False, verbose_name='Código')),
                ('name', models.CharField(max_length=128, verbose_name='Designação')),
            ],
            options={
                'verbose_name': 'Secção',
                'verbose_name_plural': 'Secções',
                'db_table': 'cae_section',
            },
        ),
        migrations.CreateModel(
            name='Division',
            fields=[
                ('code', models.SmallIntegerField(primary_key=True, serialize=False, verbose_name='Código')),
                ('name', models.CharField(max_length=128, verbose_name='Designação')),
                ('section', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cae.section', verbose_name='Secção')),
            ],
            options={
                'verbose_name': 'Divisão',
                'verbose_name_plural': 'Divisões',
                'db_table': 'cae_division',
            },
        ),
        migrations.CreateModel(
            name='CAE',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('level', models.SmallIntegerField(verbose_name='Nível')),
                ('code', models.IntegerField(verbose_name='Código')),
                ('name', models.CharField(max_length=255, verbose_name='Designação')),
            ],
            options={
                'verbose_name': 'CAE',
                'verbose_name_plural': "CAE's",
                'db_table': 'cae_cae',
                'unique_together': {('level', 'code')},
            },
        ),
    ]
