Projet

Général

Profil

0001-custom_user-index-User.username-and-User.email-49957.patch

Benjamin Dauvergne, 16 janvier 2021 19:18

Télécharger (1,94 ko)

Voir les différences:

Subject: [PATCH 1/4] custom_user: index User.username and User.email (#49957)

 .../custom_user/migrations/0022_index_email.py     | 14 ++++++++++++++
 .../custom_user/migrations/0023_index_username.py  | 14 ++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 src/authentic2/custom_user/migrations/0022_index_email.py
 create mode 100644 src/authentic2/custom_user/migrations/0023_index_username.py
src/authentic2/custom_user/migrations/0022_index_email.py
1
from django.db import migrations
2

  
3

  
4
class Migration(migrations.Migration):
5
    dependencies = [
6
        ('custom_user', '0021_set_unusable_password'),
7
    ]
8

  
9
    operations = [
10
        migrations.RunSQL(
11
            sql=r'CREATE INDEX "custom_user_user_email_idx" ON "custom_user_user" (UPPER("email") text_pattern_ops);',
12
            reverse_sql=r'DROP INDEX "custom_user_user_email_idx";'
13
        ),
14
    ]
src/authentic2/custom_user/migrations/0023_index_username.py
1
from django.db import migrations
2

  
3

  
4
class Migration(migrations.Migration):
5
    dependencies = [
6
        ('custom_user', '0022_index_email'),
7
    ]
8

  
9
    operations = [
10
        migrations.RunSQL(
11
            sql=r'CREATE INDEX "custom_user_user_username_idx" ON "custom_user_user" (UPPER("username") text_pattern_ops);',
12
            reverse_sql=r'DROP INDEX "custom_user_user_username_idx";'
13
        ),
14
    ]
0
-