Add case-insensitive index for username
[mygpo.git] / mygpo / users / migrations / 0015_case_insensitive_username.py
blob3a425115ff2e6bf469051252c87775d6b900d328
1 from django.db import migrations
4 class Migration(migrations.Migration):
5 """ Create a unique case-insensitive index on the username column """
7 dependencies = [
8 ('auth', '0001_initial'),
9 ('users', '0014_django_uuidfield'),
12 operations = [
13 migrations.RunSQL(
14 'CREATE UNIQUE INDEX user_case_insensitive_unique '
15 'ON auth_user ((lower(username)));',
16 'DROP INDEX user_case_insensitive_unique',