code for simple database read and db migration files