From fdc3774fff7cbb78f98fdac658e60cec9df370cb Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 3 Sep 2021 15:21:41 +0930 Subject: [PATCH] Add index for "name" field in role table --- gns3server/db/models/roles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/db/models/roles.py b/gns3server/db/models/roles.py index 6cba0cc1..b531a50f 100644 --- a/gns3server/db/models/roles.py +++ b/gns3server/db/models/roles.py @@ -38,7 +38,7 @@ class Role(BaseTable): __tablename__ = "roles" role_id = Column(GUID, primary_key=True, default=generate_uuid) - name = Column(String, unique=True) + name = Column(String, unique=True, index=True) description = Column(String) is_builtin = Column(Boolean, default=False) permissions = relationship("Permission", secondary=permission_role_link, back_populates="roles")