misc/migration/3.10.5_Any.py
author Dimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
Thu, 13 Feb 2014 15:09:30 +0100
changeset 9515 b0dd5b57d2d8
parent 6622 27402fe6a94a
permissions -rw-r--r--
[dataimport, migration] more fixes in the spirit of a6c32edabc8d: [entity, metadata] huuum, use resolvable url as cwuri... And fix existing ones. Closes #3390388

sync_schema_props_perms('CWSourceHostConfig', syncperms=False)

sql('INSERT INTO cw_source_relation(eid_from, eid_to) '
    'SELECT e.eid,s.cw_eid FROM entities as e, cw_CWSource as s '
    'WHERE s.cw_name=e.source AND NOT EXISTS(SELECT 1 FROM cw_source_relation WHERE eid_from=e.eid AND eid_to=s.cw_eid)')
commit()