misc/migration/bootstrapmigration_repository.py
branchstable
changeset 1952 8e19c813750d
parent 1501 c80ca83a382f
child 1954 9b20f3504af8
equal deleted inserted replaced
1951:f28e7f300d3f 1952:8e19c813750d
     4 
     4 
     5 :organization: Logilab
     5 :organization: Logilab
     6 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     6 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     7 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     7 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     8 """
     8 """
       
     9 
       
    10 if applcubicwebversion < (3, 2, 2) and cubicwebversion >= (3, 2, 1):
       
    11    from base64 import b64encode
       
    12    for table in ('entities', 'deleted_entities'):
       
    13       for eid, extid in sql('SELECT eid, extid FROM %s WHERE extid is NOT NULL'
       
    14                             % table, ask_confirm=False):
       
    15          sql('UPDATE %s SET extid=%%(extid)s WHERE eid=%%(eid)s' % table,
       
    16              {'extid': b64encode(extid), 'eid': eid}, ask_confirm=False)
       
    17    checkpoint()
     9 
    18 
    10 if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0):
    19 if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0):
    11    add_cube('card', update_database=False)
    20    add_cube('card', update_database=False)
    12 
    21 
    13 if applcubicwebversion < (2, 47, 0) and cubicwebversion >= (2, 47, 0):
    22 if applcubicwebversion < (2, 47, 0) and cubicwebversion >= (2, 47, 0):