Fix INSERT statement for postgre and sqlite in upgrade

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #333 from emanuele45/master

A bit of inserts :P
Wrong concatenation of ternary operators

Signed-off-by: emanuele <emanuele45@gmail.com>
A series of inconsistent verification errors handling

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #334 from emanuele45/fix_verification

Fix verification