database migration working