Upgrade the datamodel by applying recusively the patches available

def upgrade(yes, dry_run, patches):
    """
    Upgrade the datamodel by applying recusively the patches available
    """
    patcher = _get_mongopatcher()
    if dry_run:
        patcher.discover_and_apply(directory=patches, dry_run=dry_run)
    else:
        if (yes or prompt_bool("Are you sure you want to alter %s" %
                               green(patcher.db))):
            patcher.discover_and_apply(patches)
        else:
            raise SystemExit('You changed your mind, exiting...')