add indexes to domains and certificates tables to optimize load time

This commit is contained in:
Curtis Castrapel
2018-10-11 11:36:50 -07:00
parent 318527223b
commit e91d8ec81b
8 changed files with 91 additions and 48 deletions

View File

@ -15,7 +15,7 @@ from lemur.database import db
class Domain(db.Model):
__tablename__ = 'domains'
id = Column(Integer, primary_key=True)
name = Column(String(256))
name = Column(String(256), index=True)
sensitive = Column(Boolean, default=False)
def __repr__(self):