refactor set_accessibiliity migration for performance purpose