django-rest-framework/rest_framework/authtoken/migrations/0001_initial.py

24 lines
706 B
Python
Raw Permalink Normal View History

2014-06-23 16:52:18 +04:00
from django.conf import settings
2015-06-25 23:55:51 +03:00
from django.db import migrations, models
2014-06-23 16:52:18 +04:00
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Token',
fields=[
('key', models.CharField(primary_key=True, serialize=False, max_length=40)),
2014-06-23 16:52:18 +04:00
('created', models.DateTimeField(auto_now_add=True)),
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, related_name='auth_token', on_delete=models.CASCADE)),
2014-06-23 16:52:18 +04:00
],
options={
},
bases=(models.Model,),
),
]