def METHOD_NAME(storage):
    """Make upgrades that are specific to some backends"""
    if isinstance(storage, Legacy):
        database = storage._db  # pylint: disable=protected-access
        print("Updating indexes...")
        update_indexes(database)
        if isinstance(database, PickledDB):
            print("Updating pickledb scheme...")
            upgrade_pickledb(database)
        elif isinstance(database, MongoDB):
            print("Updating mongodb scheme...")
            upgrade_mongodb(database)