misc/migration/3.16.0_Any.py
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 17 Jun 2013 15:00:41 +0200
changeset 9045 5378a738f333
parent 8675 b60329e40e26
permissions -rw-r--r--
[repoapi] move get_repository function into a new repoapi module This new module aims to host the function of the new API replacing the old DBAPI. `get_repository` is still needed hence moved to the new module. Related to #2503918

sync_schema_props_perms('EmailAddress')

for source in rql('CWSource X WHERE X type "pyrorql"').entities():
    sconfig = source.dictconfig
    nsid = sconfig.pop('pyro-ns-id', config.appid)
    nshost = sconfig.pop('pyro-ns-host', '')
    nsgroup = sconfig.pop('pyro-ns-group', ':cubicweb')
    if nsgroup:
        nsgroup += '.'
    source.cw_set(url=u'pyro://%s/%s%s' % (nshost, nsgroup, nsid))
    source.update_config(skip_unknown=True, **sconfig)

commit()