def needs_migration(name=None, head=None, destination=None):
    """Determines whether a dataset requires a migration in order to be used in
    the specified destination revision.

    To use this method, specify either the ``name`` of an existing dataset or
    provide the ``head`` revision of the dataset.

    If ``fiftyone.config.database_admin`` is ``False`` and no ``destination``
    is provided, a dataset will be deemed to require no migration if its
    current version if compatible with the client's version.

    Args:
        name (None): the name of the dataset
        head (None): the current revision of the dataset
        destination (None): the destination revision. By default, the current
            database version is used

    Returns:
        True/False
    """
    if name is not None:
        head = get_dataset_revision(name)

    if head is None:
        head = "0.0"

    if destination is None:
        if _can_skip_migration(head):
            return False

        destination = get_database_revision()

    if head == destination:
        return False

    runner = MigrationRunner(head, destination)
    return runner.has_revisions
Determines whether a dataset requires a migration in order to be used in
    the specified destination revision.

    To use this method, specify either the ``name`` of an existing dataset or
    provide the ``head`` revision of the dataset.

    If ``fiftyone.config.database_admin`` is ``False`` and no ``destination``
    is provided, a dataset will be deemed to require no migration if its
    current version if compatible with the client's version.

    Args:
        name (None): the name of the dataset
        head (None): the current revision of the dataset
        destination (None): the destination revision. By default, the current
            database version is used

    Returns:
        True/False
    
fiftyone/migrations/runner.py