Project

General

Profile

0002-models-add-an-index-on-DeletedUser.old_uuid-69591.patch

Benjamin Dauvergne, 27 September 2022 12:58 PM

Download (2.1 KB)

View differences:

Subject: [PATCH 2/3] models: add an index on DeletedUser.old_uuid (#69591)

 .../0032_index_deleteduser_old_uuid.py         | 18 ++++++++++++++++++
 src/authentic2/custom_user/models.py           |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 src/authentic2/custom_user/migrations/0032_index_deleteduser_old_uuid.py
src/authentic2/custom_user/migrations/0032_index_deleteduser_old_uuid.py
1
# Generated by Django 2.2.26 on 2022-09-27 10:55
2

  
3
from django.db import migrations, models
4

  
5

  
6
class Migration(migrations.Migration):
7

  
8
    dependencies = [
9
        ('custom_user', '0031_profile_email'),
10
    ]
11

  
12
    operations = [
13
        migrations.AlterField(
14
            model_name='deleteduser',
15
            name='old_uuid',
16
            field=models.TextField(blank=True, db_index=True, null=True, verbose_name='Old UUID'),
17
        ),
18
    ]
src/authentic2/custom_user/models.py
451 451

  
452 452
class DeletedUser(models.Model):
453 453
    deleted = models.DateTimeField(verbose_name=_('Deletion date'), auto_now_add=True)
454
    old_uuid = models.TextField(verbose_name=_('Old UUID'), null=True, blank=True)
454
    old_uuid = models.TextField(verbose_name=_('Old UUID'), null=True, blank=True, db_index=True)
455 455
    old_user_id = models.PositiveIntegerField(verbose_name=_('Old user id'), null=True, blank=True)
456 456
    old_email = models.EmailField(verbose_name=_('Old email adress'), null=True, blank=True)
457 457
    old_data = JSONField(verbose_name=_('Old data'), null=True, blank=True)
458
-