cubicweb/misc/migration/postcreate.py
changeset 11129 97095348b3ee
parent 11075 881b3d9ee2b3
parent 11057 0b59724cb3f2
child 12567 26744ad37953
equal deleted inserted replaced
11128:9b4de34ad394 11129:97095348b3ee
    28               value=text_type(config.cubicweb_version()))
    28               value=text_type(config.cubicweb_version()))
    29 for cube in config.cubes():
    29 for cube in config.cubes():
    30     create_entity('CWProperty', pkey=u'system.version.%s' % cube.lower(),
    30     create_entity('CWProperty', pkey=u'system.version.%s' % cube.lower(),
    31                   value=text_type(config.cube_version(cube)))
    31                   value=text_type(config.cube_version(cube)))
    32 
    32 
    33 # some entities have been added before schema entities, fix the 'is' and
    33 # some entities have been added before schema entities, add their missing 'is' and
    34 # 'is_instance_of' relations
    34 # 'is_instance_of' relations
    35 for rtype in ('is', 'is_instance_of'):
    35 for rtype in ('is', 'is_instance_of'):
    36     sql('INSERT INTO %s_relation '
    36     sql('INSERT INTO %s_relation '
    37         'SELECT X.eid, ET.cw_eid FROM entities as X, cw_CWEType as ET '
    37         'SELECT X.eid, ET.cw_eid FROM entities as X, cw_CWEType as ET '
    38         'WHERE X.type=ET.cw_name AND NOT EXISTS('
    38         'WHERE X.type=ET.cw_name AND NOT EXISTS('