diff --git a/kfet/migrations/0008_auto_20160804_1736.py b/kfet/migrations/0008_auto_20160804_1736.py new file mode 100644 index 00000000..1abbb76a --- /dev/null +++ b/kfet/migrations/0008_auto_20160804_1736.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('kfet', '0007_auto_20160804_0641'), + ] + + operations = [ + migrations.AlterField( + model_name='account', + name='trigramme', + field=models.CharField(unique=True, validators=[django.core.validators.RegexValidator(regex='^[^a-z]{3}$')], db_index=True, max_length=3), + ), + ] diff --git a/kfet/models.py b/kfet/models.py index af5ac686..ad51383a 100644 --- a/kfet/models.py +++ b/kfet/models.py @@ -21,7 +21,8 @@ class Account(models.Model): trigramme = models.CharField( unique = True, max_length = 3, - validators = [RegexValidator(regex='^[^a-z]{3}$')]) + validators = [RegexValidator(regex='^[^a-z]{3}$')], + db_index = True) balance = models.DecimalField( max_digits = 6, decimal_places = 2, default = 0)