make detail migration work with previously migrated and reverted apps