From 2e5f8c7753e992dcf887ebd85d6b48ba8570c3c6 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand <benjamin.bertrand@esss.se> Date: Thu, 21 Sep 2017 22:31:20 +0200 Subject: [PATCH] Track only fields that are supposed to change ics_id, serial_number, manufacturer_id and model_id should not change. Repeating them in the history table takes space for nothing. We are only interested in tracking the status, location and parent. --- app/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models.py b/app/models.py index bbe3788..4f639c0 100644 --- a/app/models.py +++ b/app/models.py @@ -193,7 +193,8 @@ class Status(QRCodeMixin, db.Model): class Item(db.Model): __versioned__ = { - 'exclude': ['_created'] + 'exclude': ['_created', 'ics_id', 'serial_number', + 'manufacturer_id', 'model_id'] } id = db.Column(db.Integer, primary_key=True) -- GitLab