Projet

Général

Profil

0001-hobo-agent-index-the-common-Role.uuid-column-and-use.patch

Pierre Ducroquet, 07 juin 2022 11:04

Télécharger (1,8 ko)

Voir les différences:

Subject: [PATCH] hobo agent: index the common::Role.uuid column and use uuid
 type (#66011)

 .../common/migrations/0004_alter_role_uuid.py  | 18 ++++++++++++++++++
 hobo/agent/common/models.py                    |  5 ++++-
 2 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 hobo/agent/common/migrations/0004_alter_role_uuid.py
hobo/agent/common/migrations/0004_alter_role_uuid.py
1
# Generated by Django 3.2.13 on 2022-06-07 09:01
2

  
3
from django.db import migrations, models
4

  
5

  
6
class Migration(migrations.Migration):
7

  
8
    dependencies = [
9
        ('common', '0003_auto_20200707_1656'),
10
    ]
11

  
12
    operations = [
13
        migrations.AlterField(
14
            model_name='role',
15
            name='uuid',
16
            field=models.UUIDField(db_index=True),
17
        ),
18
    ]
hobo/agent/common/models.py
4 4

  
5 5

  
6 6
class Role(Group):
7
    uuid = models.CharField(max_length=32)
7
    uuid = models.UUIDField(db_index=True)
8
    #uuid = models.TextField(max_length=32)
8 9
    description = models.TextField(default=u'')
9 10
    details = models.TextField(default=u'')
10 11
    emails = ArrayField(models.CharField(max_length=128), default=list)
11 12
    emails_to_members = models.BooleanField(default=True)
12 13

  
13 14
    objects = models.Manager()
15

  
16
#raise SyntaxError("nogo")
14
-