1 # -*- coding: utf-8 -*-
2 # Generated by Django 1.11.20 on 2019-02-28 22:38
3 from __future__ import unicode_literals
5 from django.conf import settings
6 from django.db import migrations, models
7 import django.db.models.deletion
10 class Migration(migrations.Migration):
13 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
14 ('api', '0004_bookuserdata_last_changed'),
18 migrations.CreateModel(
21 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22 ('name', models.CharField(max_length=255)),
23 ('description', models.TextField()),
24 ('key', models.CharField(max_length=18)),
25 ('secret', models.CharField(max_length=32)),
26 ('status', models.CharField(choices=[(b'pending', b'Pending approval'), (b'accepted', b'Accepted'), (b'canceled', b'Canceled')], default=b'pending', max_length=16)),
27 ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='consumers', to=settings.AUTH_USER_MODEL)),
30 migrations.CreateModel(
33 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
34 ('token_key', models.CharField(max_length=18)),
35 ('consumer_key', models.CharField(max_length=18)),
36 ('key', models.CharField(max_length=255)),
39 migrations.CreateModel(
42 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
43 ('key', models.CharField(max_length=18)),
44 ('secret', models.CharField(max_length=32)),
45 ('token_type', models.IntegerField(choices=[(1, 'Request'), (2, 'Access')])),
46 ('timestamp', models.IntegerField()),
47 ('is_approved', models.BooleanField(default=False)),
48 ('consumer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Consumer')),
49 ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tokens', to=settings.AUTH_USER_MODEL)),