# Generated by Django 3.2.12 on 2022-10-17 13:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('apps', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='tenant',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='tenant',
            name='plan',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='apps.packages'),
        ),
        migrations.AddField(
            model_name='registereddomain',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='registereddomain',
            name='tld',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='apps.domaintld'),
        ),
        migrations.AlterUniqueTogether(
            name='domaintld',
            unique_together={('name', 'price')},
        ),
        migrations.AddField(
            model_name='domain',
            name='dns',
            field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='apps.registereddomain'),
        ),
        migrations.AddField(
            model_name='domain',
            name='tenant',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='domains', to='apps.tenant'),
        ),
        migrations.AlterUniqueTogether(
            name='tenant',
            unique_together={('id', 'name')},
        ),
    ]
