<reponame>jR1P621/packtrack
# Generated by Django 4.0.2 on 2022-03-09 21:40

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterModelOptions(
            name='consensus',
            options={},
        ),
        migrations.RemoveField(
            model_name='consensus',
            name='action',
        ),
        migrations.RemoveField(
            model_name='consensus',
            name='polymorphic_ctype',
        ),
        migrations.RemoveField(
            model_name='consensus',
            name='result',
        ),
        migrations.AddField(
            model_name='consensus',
            name='final_action',
            field=models.CharField(max_length=128, null=True),
        ),
        migrations.AddField(
            model_name='consensus',
            name='final_vote',
            field=models.FloatField(null=True),
        ),
        migrations.AddField(
            model_name='consensus',
            name='is_make_admin',
            field=models.BooleanField(null=True),
        ),
        migrations.AddField(
            model_name='consensus',
            name='member',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='member', to=settings.AUTH_USER_MODEL),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='consensus',
            name='type',
            field=models.IntegerField(default=1),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='consensus',
            name='initiator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='initiator', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='kennel',
            name='acronym',
            field=models.CharField(max_length=16),
        ),
        migrations.AlterField(
            model_name='membership',
            name='kennel',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='memberships', to='kennels.kennel'),
        ),
        migrations.AddConstraint(
            model_name='consensus',
            constraint=models.UniqueConstraint(condition=models.Q(('final_vote__isnull', True)), fields=('kennel', 'member'), name='unique_consensus'),
        ),
        migrations.AddConstraint(
            model_name='consensusvote',
            constraint=models.UniqueConstraint(fields=('consensus', 'voter'), name='unique_vote'),
        ),
    ]

# Generated by Django 4.0.2 on 2022-03-09 21:40

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterModelOptions(
            name='consensus',
            options={},
        ),
        migrations.RemoveField(
            model_name='consensus',
            name='action',
        ),
        migrations.RemoveField(
            model_name='consensus',
            name='polymorphic_ctype',
        ),
        migrations.RemoveField(
            model_name='consensus',
            name='result',
        ),
        migrations.AddField(
            model_name='consensus',
            name='final_action',
            field=models.CharField(max_length=128, null=True),
        ),
        migrations.AddField(
            model_name='consensus',
            name='final_vote',
            field=models.FloatField(null=True),
        ),
        migrations.AddField(
            model_name='consensus',
            name='is_make_admin',
            field=models.BooleanField(null=True),
        ),
        migrations.AddField(
            model_name='consensus',
            name='member',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='member', to=settings.AUTH_USER_MODEL),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='consensus',
            name='type',
            field=models.IntegerField(default=1),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='consensus',
            name='initiator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='initiator', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='kennel',
            name='acronym',
            field=models.CharField(max_length=16),
        ),
        migrations.AlterField(
            model_name='membership',
            name='kennel',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='memberships', to='kennels.kennel'),
        ),
        migrations.AddConstraint(
            model_name='consensus',
            constraint=models.UniqueConstraint(condition=models.Q(('final_vote__isnull', True)), fields=('kennel', 'member'), name='unique_consensus'),
        ),
        migrations.AddConstraint(
            model_name='consensusvote',
            constraint=models.UniqueConstraint(fields=('consensus', 'voter'), name='unique_vote'),
        ),
    ]
# Generated by Django 4.0.2 on 2022-03-09 21:40