1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
4 from django.db import migrations, models
5 from django.conf import settings
8 class Migration(migrations.Migration):
11 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
15 migrations.CreateModel(
18 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
19 ('name', models.CharField(max_length=255)),
20 ('description', models.TextField()),
21 ('key', models.CharField(max_length=18)),
22 ('secret', models.CharField(max_length=32)),
23 ('status', models.CharField(default=b'pending', max_length=16, choices=[(b'pending', b'Pending approval'), (b'accepted', b'Accepted'), (b'canceled', b'Canceled')])),
24 ('user', models.ForeignKey(related_name='consumers', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
27 migrations.CreateModel(
30 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
31 ('token_key', models.CharField(max_length=18)),
32 ('consumer_key', models.CharField(max_length=18)),
33 ('key', models.CharField(max_length=255)),
36 migrations.CreateModel(
39 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
40 ('name', models.CharField(max_length=255)),
41 ('url', models.TextField(max_length=2047)),
42 ('is_readonly', models.BooleanField(default=True)),
45 migrations.CreateModel(
48 ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
49 ('key', models.CharField(max_length=18)),
50 ('secret', models.CharField(max_length=32)),
51 ('token_type', models.IntegerField(choices=[(1, 'Request'), (2, 'Access')])),
52 ('timestamp', models.IntegerField()),
53 ('is_approved', models.BooleanField(default=False)),
54 ('consumer', models.ForeignKey(to='piston.Consumer')),
55 ('user', models.ForeignKey(related_name='tokens', blank=True, to=settings.AUTH_USER_MODEL, null=True)),