# Generated by Django 2.1.5 on 2019-02-05 16:54

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),
        ('openbook_communities', '0004_communitymoderatoruseractionlog_target_user'),
    ]

    operations = [
        migrations.CreateModel(
            name='CommunityAdministratorUserActionLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(editable=False)),
                ('action_type', models.CharField(choices=[('AM', 'Add Moderator'), ('RM', 'Remove Moderator'), ('AA', 'Add Administrator'), ('RA', 'Remove Administrator')], editable=False, max_length=2)),
                ('administrator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('community', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='administrators_user_actions_logs', to='openbook_communities.Community')),
                ('target_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='communitymoderatoruseractionlog',
            name='action_type',
            field=models.CharField(choices=[('B', 'Ban'), ('U', 'Unban'), ('AM', 'Add Moderator'), ('RM', 'Remove Moderator'), ('AA', 'Add Administrator'), ('RA', 'Remove Administrator')], editable=False, max_length=2),
        ),
    ]
