# Generated by Django 3.1.3 on 2020-11-09 12:54

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


class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.AddField(
            model_name='userlogs',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='userblock',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='block',
                                       to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='social',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_social_identifier',
                                    to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='scope',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='drf_auth_service.service'),
        ),
        migrations.AddField(
            model_name='role',
            name='scopes',
            field=models.ManyToManyField(to='drf_auth_service.Scope'),
        ),
        migrations.AddField(
            model_name='role',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='drf_auth_service.service'),
        ),
        migrations.AddField(
            model_name='config',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='configs',
                                    to='drf_auth_service.service'),
        ),
        migrations.AddField(
            model_name='activationcode',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activation_code',
                                    to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='ssouser',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='drf_auth_service.service'),
        ),
        migrations.AlterUniqueTogether(
            name='social',
            unique_together={('user', 'social_type')},
        ),
        migrations.AlterUniqueTogether(
            name='config',
            unique_together={('service', 'key')},
        ),
        migrations.AlterUniqueTogether(
            name='ssouser',
            unique_together={('username', 'service')},
        ),
    ]
