Avoid deprecation warning in migration