Better version detection for update/migrate