From d72709e0f4eb0c3e47a98a743820edf14c3884cb Mon Sep 17 00:00:00 2001 From: Khanh Ngo Date: Sun, 11 Oct 2020 12:49:28 +0200 Subject: [PATCH] Add index on history table --- powerdnsadmin/models/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerdnsadmin/models/history.py b/powerdnsadmin/models/history.py index 709a911..a315edc 100644 --- a/powerdnsadmin/models/history.py +++ b/powerdnsadmin/models/history.py @@ -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