Improved DB onUpgrade method
Restored DB version, used only for tests
Merge branch 'master' into feature/analytics_improvements