def METHOD_NAME(plugin, version=u"head", forward=True):
    if not version:
        version = u"head" if forward else u"base"
    with _repo_for_plugin(plugin) as repo:
        if forward:
            repo.upgrade_db(version)
        else:
            repo.downgrade_db(version)