def _get_old_license_titles(migrate_engine):
    """Returns a dict of old license titles, keyed by old license id."""
    titles = {}
    select_licenses = 'SELECT id, name FROM license;'
    q = migrate_engine.execute(select_licenses)
    for id, title in q:
        titles[id] = title
    return titles
