From c74d60af6960120c7f0bcf7290ae1b316ff36e17 Mon Sep 17 00:00:00 2001 From: mahdavi Date: Tue, 9 Jun 2020 22:06:15 +0430 Subject: [PATCH] splite migration file --- apps/gooyal_oauth/migrations/0001_initial.py | 11 --------- apps/gooyal_oauth/migrations/0002_scope.py | 25 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 apps/gooyal_oauth/migrations/0002_scope.py diff --git a/apps/gooyal_oauth/migrations/0001_initial.py b/apps/gooyal_oauth/migrations/0001_initial.py index 63f4126..2e7c79f 100644 --- a/apps/gooyal_oauth/migrations/0001_initial.py +++ b/apps/gooyal_oauth/migrations/0001_initial.py @@ -16,20 +16,9 @@ class Migration(migrations.Migration): 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=[ diff --git a/apps/gooyal_oauth/migrations/0002_scope.py b/apps/gooyal_oauth/migrations/0002_scope.py new file mode 100644 index 0000000..9f7a16c --- /dev/null +++ b/apps/gooyal_oauth/migrations/0002_scope.py @@ -0,0 +1,25 @@ +# Generated by Django 3.0.6 on 2020-06-09 17:25 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('gooyal_oauth', '0001_initial'), + ] + + 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)), + ], + ), + ]