misc/migration/bootstrapmigration_repository.py
branchtls-sprint
changeset 1501 c80ca83a382f
parent 1399 3f408c7a164e
child 1952 8e19c813750d
equal deleted inserted replaced
1500:099e479e34bf 1501:c80ca83a382f
     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 
     9 
       
    10 if applcubicwebversion < (3, 2, 0) and cubicwebversion >= (3, 2, 0):
       
    11    add_cube('card', update_database=False)
       
    12 
    10 if applcubicwebversion < (2, 47, 0) and cubicwebversion >= (2, 47, 0):
    13 if applcubicwebversion < (2, 47, 0) and cubicwebversion >= (2, 47, 0):
    11     from cubicweb.server import schemaserial
    14     from cubicweb.server import schemaserial
    12     schemaserial.HAS_FULLTEXT_CONTAINER = False
    15     schemaserial.HAS_FULLTEXT_CONTAINER = False
    13     session.set_shared_data('do-not-insert-is_instance_of', True)
    16     session.set_shared_data('do-not-insert-is_instance_of', True)
    14     add_attribute('CWRType', 'fulltext_container')
    17     add_attribute('CWRType', 'fulltext_container')
    15     schemaserial.HAS_FULLTEXT_CONTAINER = True
    18     schemaserial.HAS_FULLTEXT_CONTAINER = True
    16 
    19 
    17 
    20 
    18  
    21 
    19 if applcubicwebversion < (2, 50, 0) and cubicwebversion >= (2, 50, 0):
    22 if applcubicwebversion < (2, 50, 0) and cubicwebversion >= (2, 50, 0):
    20     session.set_shared_data('do-not-insert-is_instance_of', True)
    23     session.set_shared_data('do-not-insert-is_instance_of', True)
    21     add_relation_type('is_instance_of')
    24     add_relation_type('is_instance_of')
    22     # fill the relation using an efficient sql query instead of using rql
    25     # fill the relation using an efficient sql query instead of using rql
    23     sql('INSERT INTO is_instance_of_relation '
    26     sql('INSERT INTO is_instance_of_relation '
    38 )''')
    41 )''')
    39     sql('CREATE INDEX deleted_entities_type_idx ON deleted_entities(type)')
    42     sql('CREATE INDEX deleted_entities_type_idx ON deleted_entities(type)')
    40     sql('CREATE INDEX deleted_entities_dtime_idx ON deleted_entities(dtime)')
    43     sql('CREATE INDEX deleted_entities_dtime_idx ON deleted_entities(dtime)')
    41     sql('CREATE INDEX deleted_entities_extid_idx ON deleted_entities(extid)')
    44     sql('CREATE INDEX deleted_entities_extid_idx ON deleted_entities(extid)')
    42     checkpoint()
    45     checkpoint()
    43    
    46