data_migration/services/graph.py
def apply(self, name: Optional[str] = None,
              fail_silently: bool = False) -> None:
        """
        Apply the migration graph until (and including) given name.

        :raises Graph.EmptyGraphError(): on attempt on empty graph
        :param name: target migration name
        :param fail_silently: raise exception when applying empty graph
        """
        node: GraphNode = self.get_node(name)
        if not node:
            if not fail_silently:
                raise Graph.EmptyGraphError()
            return

        # revert or apply migrations depending on current state
        if (node.next and node.next.node.is_applied) or name == 'zero':
            self.revert_graph(node, name == 'zero')
        else:
            self.forward_graph(node, not bool(name))

        Apply the migration graph until (and including) given name.

        :raises Graph.EmptyGraphError(): on attempt on empty graph
        :param name: target migration name
        :param fail_silently: raise exception when applying empty graph
        
Apply the migration graph until (and including) given name.
Apply the migration graph until ( and including ) given name .
def apply(self, name: Optional[str] = None,
              fail_silently: bool = False) -> None:
        node: GraphNode = self.get_node(name)
        if not node:
            if not fail_silently:
                raise Graph.EmptyGraphError()
            return
        if (node.next and node.next.node.is_applied) or name == 'zero':
            self.revert_graph(node, name == 'zero')
        else:
            self.forward_graph(node, not bool(name))
def apply ( self , name : Optional [ str ] = None , fail_silently : bool = False ) -> None : node : GraphNode = self . get_node ( name ) if not node : if not fail_silently : raise Graph . EmptyGraphError ( ) return if ( node . next and node . next . node . is_applied ) or name == 'zero' : self . revert_graph ( node , name == 'zero' ) else : self . forward_graph ( node , not bool ( name ) )
Apply the migration graph until (and including) given name.
Apply the migration graph until ( and including ) given name .
"""
        Apply the migration graph until (and including) given name.

        :raises Graph.EmptyGraphError(): on attempt on empty graph
        :param name: target migration name
        :param fail_silently: raise exception when applying empty graph
        """ # revert or apply migrations depending on current state
on attempt on empty graph
on attempt on empty graph
Graph.EmptyGraphError()
self
name
Optional[str]
target migration name
target migration name
fail_silently
bool
raise exception when applying empty graph
raise exception when applying empty graph