Read and save history to database
Merge remote-tracking branch 'POS/master'