# Generated by Django 3.0.6 on 2020-06-08 05:26 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import oauth2_provider.generators class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), migrations.swappable_dependency(settings.OAUTH2_PROVIDER_APPLICATION_MODEL), ] operations = [ migrations.CreateModel( name='Scope', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(help_text='The name of the scope.', max_length=255, unique=True)), ('description', models.TextField(help_text='A brief description of the scope. This text is displayed to users when authorising access for the scope.')), ('is_default', models.BooleanField(default=False, help_text='Indicates if this scope should be included in the default scopes.')), ('application', models.ForeignKey(blank=True, help_text='The application to which the scope belongs.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='scopes', to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)), ], ), migrations.CreateModel( name='Application', fields=[ ('id', models.BigAutoField(primary_key=True, serialize=False)), ('client_id', models.CharField(db_index=True, default=oauth2_provider.generators.generate_client_id, max_length=100, unique=True)), ('redirect_uris', models.TextField(blank=True, help_text='Allowed URIs list, space separated')), ('client_type', models.CharField(choices=[('confidential', 'Confidential'), ('public', 'Public')], max_length=32)), ('authorization_grant_type', models.CharField(choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials')], max_length=32)), ('client_secret', models.CharField(blank=True, db_index=True, default=oauth2_provider.generators.generate_client_secret, max_length=255)), ('name', models.CharField(blank=True, max_length=255)), ('skip_authorization', models.BooleanField(default=False)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('allowed_scope', models.TextField(blank=True)), ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='gooyal_oauth_application', to=settings.AUTH_USER_MODEL)), ], options={ 'abstract': False, }, ), ]