Added database version control with shared preferences