def apply_all(self):
        """
        Applies all Django model migrations at once, recording the result.
        """
        if self.__closed:
            raise MigrationSessionError("Can't apply applied session")
        if self._to_apply:
            raise MigrationSessionError("Can't apply_all with migrations added to session")

        try:
            self.__apply(run_all=True)
        except:
            raise
        finally:
            self.__closed = True