def get_datasets_revisions():
    """Gets the current revision of all datasets.

    Returns:
        a dictionary mapping dataset names to their revision strings
    """
    conn = foo.get_db_conn()
    return {
        dataset_doc["name"]: dataset_doc.get("version", None)
        for dataset_doc in conn.datasets.find(
            {"name": {"$exists": 1}}, {"name": 1, "version": 1}
        )
    }
Gets the current revision of all datasets.

    Returns:
        a dictionary mapping dataset names to their revision strings
    
fiftyone/migrations/runner.py