Store db version
Detect when db version change and upgrade