Resolve a migration instance from a file.

        :param migration_file: The migration file
        :type migration_file: str

        :rtype: orator.migrations.migration.Migration

def _resolve(self, path, migration_file):
        """
        Resolve a migration instance from a file.

        :param migration_file: The migration file
        :type migration_file: str

        :rtype: orator.migrations.migration.Migration
        """
        name = "_".join(migration_file.split("_")[4:])
        migration_file = os.path.join(path, "%s.py" % migration_file)

        # Loading parent module
        parent = os.path.join(path, "__init__.py")
        if not os.path.exists(parent):
            with open(parent, "w"):
                pass

        load_module("migrations", parent)

        # Loading module
        mod = load_module("migrations.%s" % name, migration_file)

        klass = getattr(mod, inflection.camelize(name))

        instance = klass()
        instance.set_connection(self.get_repository().get_connection())

        return instance