# Generated by Django 5.0.7 on 2024-08-01 19:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Azienda',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nome', models.CharField(default='', max_length=132)),
                ('partitaiva', models.CharField(default='', max_length=11)),
                ('mail', models.CharField(default='', max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Assegnazione',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddConstraint(
            model_name='azienda',
            constraint=models.UniqueConstraint(fields=('nome', 'partitaiva'), name='unique-azienda'),
        ),
        migrations.AddField(
            model_name='assegnazione',
            name='a',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='azienda.azienda'),
        ),
    ]
