Browse Source

Index the api_key fields.

pull/194/head
Pēteris Caune 6 years ago
parent
commit
c89a0b4e40
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
2 changed files with 31 additions and 2 deletions
  1. +29
    -0
      hc/accounts/migrations/0026_auto_20190204_2042.py
  2. +2
    -2
      hc/accounts/models.py

+ 29
- 0
hc/accounts/migrations/0026_auto_20190204_2042.py View File

@ -0,0 +1,29 @@
# Generated by Django 2.1.5 on 2019-02-04 20:42
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('accounts', '0025_remove_member_team'),
]
operations = [
migrations.AlterField(
model_name='project',
name='api_key',
field=models.CharField(blank=True, db_index=True, max_length=128),
),
migrations.AlterField(
model_name='project',
name='api_key_readonly',
field=models.CharField(blank=True, db_index=True, max_length=128),
),
migrations.AlterField(
model_name='project',
name='code',
field=models.UUIDField(default=uuid.uuid4, unique=True),
),
]

+ 2
- 2
hc/accounts/models.py View File

@ -214,8 +214,8 @@ class Project(models.Model):
code = models.UUIDField(default=uuid.uuid4, unique=True) code = models.UUIDField(default=uuid.uuid4, unique=True)
name = models.CharField(max_length=200, blank=True) name = models.CharField(max_length=200, blank=True)
owner = models.ForeignKey(User, models.CASCADE) owner = models.ForeignKey(User, models.CASCADE)
api_key = models.CharField(max_length=128, blank=True)
api_key_readonly = models.CharField(max_length=128, blank=True)
api_key = models.CharField(max_length=128, blank=True, db_index=True)
api_key_readonly = models.CharField(max_length=128, blank=True, db_index=True)
badge_key = models.CharField(max_length=150, unique=True) badge_key = models.CharField(max_length=150, unique=True)
def __str__(self): def __str__(self):


Loading…
Cancel
Save