misc/migration/bootstrapmigration_repository.py
changeset 2578 b717ebef04d8
parent 2480 a04caff1322e
child 2696 b45d852990d5
equal deleted inserted replaced
2577:7c9888114085 2578:b717ebef04d8
    27         except RepositoryError:
    27         except RepositoryError:
    28             print 'unable to set cwuri for', eid, session.describe(eid)
    28             print 'unable to set cwuri for', eid, session.describe(eid)
    29     isession.commit()
    29     isession.commit()
    30     repo.hm.register_hook(uniquecstrcheck_before_modification, 'before_add_entity', '')
    30     repo.hm.register_hook(uniquecstrcheck_before_modification, 'before_add_entity', '')
    31     repo.hm.register_hook(uniquecstrcheck_before_modification, 'before_update_entity', '')
    31     repo.hm.register_hook(uniquecstrcheck_before_modification, 'before_update_entity', '')
       
    32     session.set_shared_data('do-not-insert-cwuri', False)
    32 
    33 
    33 if applcubicwebversion < (3, 2, 2) and cubicwebversion >= (3, 2, 1):
    34 if applcubicwebversion < (3, 2, 2) and cubicwebversion >= (3, 2, 1):
    34     from base64 import b64encode
    35     from base64 import b64encode
    35     for table in ('entities', 'deleted_entities'):
    36     for table in ('entities', 'deleted_entities'):
    36         for eid, extid in sql('SELECT eid, extid FROM %s WHERE extid is NOT NULL'
    37         for eid, extid in sql('SELECT eid, extid FROM %s WHERE extid is NOT NULL'