Add index on history table

This commit is contained in:
Khanh Ngo 2020-10-11 12:49:28 +02:00
parent a1c1b35696
commit d72709e0f4
No known key found for this signature in database
GPG Key ID: 29077342AA5648F6

View File

@ -12,7 +12,7 @@ class History(db.Model):
# detail = db.Column(db.Text().with_variant(db.Text(length=2**24-2), 'mysql')) # detail = db.Column(db.Text().with_variant(db.Text(length=2**24-2), 'mysql'))
detail = db.Column(db.Text()) detail = db.Column(db.Text())
created_by = db.Column(db.String(128)) created_by = db.Column(db.String(128))
created_on = db.Column(db.DateTime, default=datetime.utcnow) created_on = db.Column(db.DateTime, index=True, default=datetime.utcnow)
def __init__(self, id=None, msg=None, detail=None, created_by=None): def __init__(self, id=None, msg=None, detail=None, created_by=None):
self.id = id self.id = id