How to do, 'Versioning with a History Table' in Flask SQLALchemy. Preferably with some code examples
<p>My models are made of flask-sqlalchemy on top of postgresql. I want to keep track of changes made my models.</p>

<p>I have a employees table:</p>

<pre><code>class Employee(db.Model):
__tablename__ = 'employees'

id            = db.Column(db.Integer, primary_key=True)
name          = db.Column(db.String(60))
job_title         = db.Column(db.String(60))
job_type      = db.Column(db.String(60))  # teaching, IT, manager,  
job_location  = db.Column(db.String(60)) 
salary        = db.Column(db.Numeric(15,2)) 
</code></pre>

<p>The salary of particular title of employees are increased from 30k to 35k at <code>dec 2014</code>, and to 40k at <code>jan 2016</code>.</p>

<p>And in some another part of my application say while calculating the revenue and balance sheet, the above <code>employees.salary</code> is used in the formula. So I should be able to use old salary 30k for any calculation involving dates before <code>dec 2014</code>, and 35k after that, up to <code>jan 2016</code>. Any detailed answer with codes related to this example I have is much appreciated, thank you. </p>

<p>I've been searching for how to do this, everywhere with no luck. </p>