data_migration/services/graph.py
def apply(self) -> None:
        """
        Apply node.

        Calling this method will execute the routines within the node.
        If the migration is already applied do nothing.
        """
        if self.node.is_applied:
            return

        if self.prepare_migration_state():
            connection = connections['default']

            # Work out which apps have migrations and which do not
            executor = MigrationExecutor(connection)
            pre_migrate_state = executor._create_project_state(
                with_applied_migrations=True)
            current_state_apps = pre_migrate_state.apps
            with connection.schema_editor(atomic=True) as schema_editor:
                for routine in self.routines:
                    routine(
                        apps=current_state_apps,
                        schema_editor=schema_editor
                    )
        self.node.apply()

        Apply node.

        Calling this method will execute the routines within the node.
        If the migration is already applied do nothing.
        
Apply node.
Calling this method will execute the routines within the node.
If the migration is already applied do nothing.
Apply node . Calling this method will execute the routines within the node . If the migration is already applied do nothing .
def apply(self) -> None:
        if self.node.is_applied:
            return
        if self.prepare_migration_state():
            connection = connections['default']
            executor = MigrationExecutor(connection)
            pre_migrate_state = executor._create_project_state(
                with_applied_migrations=True)
            current_state_apps = pre_migrate_state.apps
            with connection.schema_editor(atomic=True) as schema_editor:
                for routine in self.routines:
                    routine(
                        apps=current_state_apps,
                        schema_editor=schema_editor
                    )
        self.node.apply()
def apply ( self ) -> None : if self . node . is_applied : return if self . prepare_migration_state ( ) : connection = connections [ 'default' ] executor = MigrationExecutor ( connection ) pre_migrate_state = executor . _create_project_state ( with_applied_migrations = True ) current_state_apps = pre_migrate_state . apps with connection . schema_editor ( atomic = True ) as schema_editor : for routine in self . routines : routine ( apps = current_state_apps , schema_editor = schema_editor ) self . node . apply ( )
Apply node.
Apply node .
"""
        Apply node.

        Calling this method will execute the routines within the node.
        If the migration is already applied do nothing.
        """ # Work out which apps have migrations and which do not
self