# Generated by Django 4.2.16 on 2024-11-21 11:14

import ansible_base.oauth2_provider.models.access_token
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),
        ('dab_oauth2_provider', '0005_hash_existing_tokens'),
    ]

    operations = [
        migrations.AlterField(
            model_name='oauth2accesstoken',
            name='created',
            field=models.DateTimeField(auto_now_add=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2accesstoken',
            name='created_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who created this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2accesstoken',
            name='modified',
            field=models.DateTimeField(auto_now=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2accesstoken',
            name='modified_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2accesstoken',
            name='scope',
            field=models.CharField(default='write', help_text="Allowed scopes, further restricts user permissions. Must be a simple space-separated string with allowed scopes ['read', 'write'].", max_length=32, validators=[ansible_base.oauth2_provider.models.access_token.validate_scope]),
        ),
        migrations.AlterField(
            model_name='oauth2accesstoken',
            name='user',
            field=models.ForeignKey(blank=True, help_text='The user representing the token owner.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='access_tokens', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2application',
            name='created',
            field=models.DateTimeField(auto_now_add=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2application',
            name='created_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who created this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2application',
            name='modified',
            field=models.DateTimeField(auto_now=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2application',
            name='modified_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2application',
            name='name',
            field=models.CharField(help_text='The name of this resource.', max_length=512),
        ),
        migrations.AlterField(
            model_name='oauth2idtoken',
            name='created',
            field=models.DateTimeField(auto_now_add=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2idtoken',
            name='created_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who created this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2idtoken',
            name='modified',
            field=models.DateTimeField(auto_now=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2idtoken',
            name='modified_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2refreshtoken',
            name='created',
            field=models.DateTimeField(auto_now_add=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2refreshtoken',
            name='created_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who created this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_created+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='oauth2refreshtoken',
            name='modified',
            field=models.DateTimeField(auto_now=True, help_text='The date/time this resource was created.'),
        ),
        migrations.AlterField(
            model_name='oauth2refreshtoken',
            name='modified_by',
            field=models.ForeignKey(default=None, editable=False, help_text='The user who last modified this resource.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(app_label)s_%(class)s_modified+', to=settings.AUTH_USER_MODEL),
        ),
    ]
