def _migrate_same_as_structure(data, client):
    """Changes sameAs string to schema:URL object."""
    same_as = data.get('same_as')
    if same_as and isinstance(same_as, str):
        data['same_as'] = {'@type': ['schema:URL'], 'url': same_as}
        if data.get('@context'):
            data['@context'].setdefault('same_as', {'@id': 'schema:sameAs',
                '@type': 'schema:URL', '@context': {'@version': '1.1',
                'url': 'schema:url', 'schema': 'http://schema.org/'}})
    return data
