# Generated by Django 3.0.3 on 2021-05-26 21:59

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0011_auto_20210324_1528'),
    ]
    from django.apps import apps
    try:
        ClaimAdmin = apps.get_model('claim', 'ClaimAdmin')
    except:
        ClaimAdmin = None
        
    if ClaimAdmin:
        dependencies.append(('claim', '0012_item_service_jsonExtField'))
        
    operations = [
        migrations.AddField(
            model_name='user',
            name='claim_admin',
            #TOREVERT
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='claim.ClaimAdmin' if ClaimAdmin else 'core.ClaimAdmin'),
        ),
        migrations.AddField(
            model_name='user',
            name='officer',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Officer'),
        ),
        migrations.CreateModel(
            name='UserMutation',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('mutation', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='users', to='core.MutationLog')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='mutations', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'core_UserMutation',
                'managed': True,
            },
            bases=(models.Model, core.models.ObjectMutation),
        ),
    ]
