@_ec_dispatcher.dispatch_for(ops.MigrationScript)
def _migration_script_ops(context, directive, phase):
 version_path = cli._get_version_branch_path(context.config, release=cli.CURRENT_RELEASE, branch=phase)
 autogen_kwargs = {}
 cli._check_bootstrap_new_branch(phase, version_path, autogen_kwargs)
 op = ops.MigrationScript(new_rev_id(), ops.UpgradeOps(ops=[d for d in _assign_directives(context, directive.upgrade_ops.ops, phase)]), ops.DowngradeOps(ops=[]), message=directive.message, **autogen_kwargs)
 if (not op.upgrade_ops.is_empty()):
  return op

@ _ec_dispatcher . dispatch_for ( ops . MigrationScript ) def _migration_script_ops ( context , directive , phase ) : version_path = cli . _get_version_branch_path ( context . config , release = cli . CURRENT_RELEASE , branch = phase ) autogen_kwargs = { } cli . _check_bootstrap_new_branch ( phase , version_path , autogen_kwargs ) op = ops . MigrationScript ( new_rev_id ( ) , ops . UpgradeOps ( ops = [ d for d in _assign_directives ( context , directive . upgrade_ops . ops , phase ) ] ) , ops . DowngradeOps ( ops = [ ] ) , message = directive . message , ** autogen_kwargs ) if ( not op . upgrade_ops . is_empty ( ) ) : return op
generate a new ops .