# Generated by Django 2.2.26 on 2022-09-20 15:20

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


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.RBAC_ROLE_MODEL),
        ('authenticators', '0004_auto_20220726_1708'),
        ('authentic2_auth_saml', '0012_move_add_role_action'),
    ]

    state_operations = [
        migrations.CreateModel(
            name='AddRoleAction',
            fields=[
                (
                    'id',
                    models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
                ),
                (
                    'condition',
                    models.CharField(
                        blank=True, editable=False, max_length=256, verbose_name='Condition (unused)'
                    ),
                ),
                (
                    'mandatory',
                    models.BooleanField(default=False, editable=False, verbose_name='Mandatory (unused)'),
                ),
                (
                    'authenticator',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name='add_role_actions',
                        to='authenticators.BaseAuthenticator',
                    ),
                ),
                (
                    'role',
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name='add_role_actions',
                        to=settings.RBAC_ROLE_MODEL,
                        verbose_name='Role',
                    ),
                ),
            ],
            options={
                'verbose_name': 'Add a role',
                'verbose_name_plural': 'Add roles',
                'default_related_name': 'add_role_actions',
            },
        ),
    ]

    operations = [migrations.SeparateDatabaseAndState(state_operations=state_operations)]
