Skip to content

Commit

Permalink
models: add created field to ApiKey
Browse files Browse the repository at this point in the history
  • Loading branch information
enku committed Feb 22, 2024
1 parent c0686db commit 24b838c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gentoo_build_publisher/migrations/0004_apikey.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Migration(migrations.Migration):
models.CharField(max_length=256, primary_key=True, serialize=False),
),
("name", models.CharField(max_length=128, unique=True)),
("created", models.DateTimeField(auto_now_add=True)),
("last_used", models.DateTimeField(default=None, null=True)),
],
),
Expand Down
1 change: 1 addition & 0 deletions src/gentoo_build_publisher/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ class ApiKey(models.Model):
"""API keys"""
apikey = models.CharField(max_length=256, primary_key=True)
name = models.CharField(max_length=128, unique=True)
created = models.DateTimeField(auto_now_add=True)
last_used = models.DateTimeField(null=True, default=None)

0 comments on commit 24b838c

Please sign in to comment.