Merge pull request #825 from ngoduykhanh/adjustment

Add index on history table
This commit is contained in:
Khanh Ngo 2020-10-11 13:11:09 +02:00 committed by GitHub
commit 7254a94497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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())
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):
self.id = id