Fix #401 Database upgrade failed when starting freeseer

Closes #417
Signed-off-by: Thanh Ha <thanh.ha@alumni.carleton.ca>