Add properties.last_transaction_when column

Add update_db.py script and refactor create_db.py script