Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Debian New Member Process
nm.debian.org
Commits
59a0c3fd
Commit
59a0c3fd
authored
Aug 29, 2015
by
Enrico Zini
Browse files
Redone apikeys migrations
parent
8ed08e17
Changes
2
Hide whitespace changes
Inline
Side-by-side
apikeys/migrations/0001_initial.py
View file @
59a0c3fd
...
...
@@ -2,11 +2,13 @@
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
from
django.conf
import
settings
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
]
operations
=
[
...
...
@@ -31,9 +33,16 @@ class Migration(migrations.Migration):
(
'name'
,
models
.
CharField
(
max_length
=
16
)),
(
'value'
,
models
.
CharField
(
unique
=
True
,
max_length
=
16
)),
(
'enabled'
,
models
.
BooleanField
(
default
=
True
)),
(
'user'
,
models
.
ForeignKey
(
to
=
settings
.
AUTH_USER_MODEL
)),
],
options
=
{
},
bases
=
(
models
.
Model
,),
),
migrations
.
AddField
(
model_name
=
'auditlog'
,
name
=
'key'
,
field
=
models
.
ForeignKey
(
to
=
'apikeys.Key'
),
preserve_default
=
True
,
),
]
apikeys/migrations/0002_auto_20141011_2110.py
deleted
100644 → 0
View file @
8ed08e17
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
from
django.conf
import
settings
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'apikeys'
,
'0001_initial'
),
migrations
.
swappable_dependency
(
settings
.
AUTH_USER_MODEL
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'key'
,
name
=
'user'
,
field
=
models
.
ForeignKey
(
to
=
settings
.
AUTH_USER_MODEL
),
preserve_default
=
True
,
),
migrations
.
AddField
(
model_name
=
'auditlog'
,
name
=
'key'
,
field
=
models
.
ForeignKey
(
to
=
'apikeys.Key'
),
preserve_default
=
True
,
),
]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment