76 lines
3.2 KiB
Python
76 lines
3.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.11 on 2018-03-31 13:36
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import fargo.oauth2.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
replaces = [('oauth2', '0001_initial'), ('oauth2', '0002_auto_20180321_2343'), ('oauth2', '0003_auto_20180322_1016'), ('oauth2', '0004_auto_20180326_1330'), ('oauth2', '0005_auto_20180331_1532')]
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('fargo', '0013_document_mime_type'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='OAuth2Authorize',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('access_token', models.CharField(default=fargo.oauth2.models.generate_uuid, max_length=255)),
|
|
('code', models.CharField(default=fargo.oauth2.models.generate_uuid, max_length=255)),
|
|
('creation_date', models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
options={
|
|
'ordering': ('creation_date',),
|
|
'verbose_name': 'OAUTH2 authorization',
|
|
'verbose_name_plural': 'OAUTH2 authorizations',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='OAuth2Client',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('client_name', models.CharField(max_length=255)),
|
|
('redirect_uris', models.TextField(verbose_name='redirect URIs', validators=[fargo.oauth2.models.validate_https_url])),
|
|
('client_id', models.CharField(default=fargo.oauth2.models.generate_uuid, max_length=255)),
|
|
('client_secret', models.CharField(default=fargo.oauth2.models.generate_uuid, max_length=255)),
|
|
],
|
|
options={
|
|
'ordering': ('client_name',),
|
|
'verbose_name': 'OAUTH2 client',
|
|
'verbose_name_plural': 'OAUTH2 clients',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='OAuth2TempFile',
|
|
fields=[
|
|
('uuid', models.CharField(default=fargo.oauth2.models.generate_uuid, max_length=32, serialize=False, primary_key=True)),
|
|
('filename', models.CharField(max_length=512)),
|
|
('creation_date', models.DateTimeField(auto_now_add=True)),
|
|
('client', models.ForeignKey(to='oauth2.OAuth2Client')),
|
|
('document', models.ForeignKey(related_name='oauth2_tempfiles', to='fargo.Document')),
|
|
],
|
|
options={
|
|
'ordering': ('creation_date',),
|
|
'verbose_name': 'OAUTH2 temporary file',
|
|
'verbose_name_plural': 'OAUTH2 temporary files',
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name='oauth2authorize',
|
|
name='client',
|
|
field=models.ForeignKey(to='oauth2.OAuth2Client'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='oauth2authorize',
|
|
name='user_document',
|
|
field=models.ForeignKey(to='fargo.UserDocument'),
|
|
),
|
|
]
|