Skip to content

Commit 1a5d948

Browse files
author
Emmanouil Konstantinidis
committed
Create Migrations
1 parent 521498e commit 1a5d948

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import migrations, models
5+
import uuid
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='APIKey',
16+
fields=[
17+
('id', models.UUIDField(editable=False, serialize=False, default=uuid.uuid4, primary_key=True)),
18+
('created', models.DateTimeField(auto_now_add=True)),
19+
('modified', models.DateTimeField(auto_now=True)),
20+
('name', models.CharField(unique=True, max_length=50)),
21+
('key', models.CharField(unique=True, max_length=40)),
22+
],
23+
options={
24+
'ordering': ['-created'],
25+
'verbose_name_plural': 'API Keys',
26+
},
27+
),
28+
]

rest_framework_api_key/migrations/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)