mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 18:07:36 -02:30
Added gfk index pair for Role for our access_list queries
This commit is contained in:
@@ -129,6 +129,10 @@ class Migration(migrations.Migration):
|
|||||||
name='ancestors',
|
name='ancestors',
|
||||||
field=models.ManyToManyField(related_name='descendents', through='main.RoleAncestorEntry', to='main.Role'),
|
field=models.ManyToManyField(related_name='descendents', through='main.RoleAncestorEntry', to='main.Role'),
|
||||||
),
|
),
|
||||||
|
migrations.AlterIndexTogether(
|
||||||
|
name='role',
|
||||||
|
index_together=set([('content_type', 'object_id')]),
|
||||||
|
),
|
||||||
migrations.AlterIndexTogether(
|
migrations.AlterIndexTogether(
|
||||||
name='roleancestorentry',
|
name='roleancestorentry',
|
||||||
index_together=set([('ancestor', 'content_type_id', 'object_id'), ('ancestor', 'content_type_id', 'role_field'), ('ancestor', 'descendent')]),
|
index_together=set([('ancestor', 'content_type_id', 'object_id'), ('ancestor', 'content_type_id', 'role_field'), ('ancestor', 'descendent')]),
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ class Role(models.Model):
|
|||||||
app_label = 'main'
|
app_label = 'main'
|
||||||
verbose_name_plural = _('roles')
|
verbose_name_plural = _('roles')
|
||||||
db_table = 'main_rbac_roles'
|
db_table = 'main_rbac_roles'
|
||||||
|
index_together = [
|
||||||
|
("content_type", "object_id")
|
||||||
|
]
|
||||||
|
|
||||||
role_field = models.TextField(null=False)
|
role_field = models.TextField(null=False)
|
||||||
singleton_name = models.TextField(null=True, default=None, db_index=True, unique=True)
|
singleton_name = models.TextField(null=True, default=None, db_index=True, unique=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user