fixed migration and update_attribute