34 rdef.object = schema.eschema(objtype) |
34 rdef.object = schema.eschema(objtype) |
35 ss.execschemarql(rql, rdef, ss.rdef2rql(rdef, CSTRMAP, groupmap=None)) |
35 ss.execschemarql(rql, rdef, ss.rdef2rql(rdef, CSTRMAP, groupmap=None)) |
36 commit(ask_confirm=False) |
36 commit(ask_confirm=False) |
37 |
37 |
38 if applcubicwebversion <= (3, 13, 0) and cubicwebversion >= (3, 13, 1): |
38 if applcubicwebversion <= (3, 13, 0) and cubicwebversion >= (3, 13, 1): |
39 sql('ALTER TABLE entities ADD COLUMN asource VARCHAR(64)') |
39 sql('ALTER TABLE entities ADD asource VARCHAR(64)') |
40 sql('UPDATE entities SET asource=cw_name ' |
40 sql('UPDATE entities SET asource=cw_name ' |
41 'FROM cw_CWSource, cw_source_relation ' |
41 'FROM cw_CWSource, cw_source_relation ' |
42 'WHERE entities.eid=cw_source_relation.eid_from AND cw_source_relation.eid_to=cw_CWSource.cw_eid') |
42 'WHERE entities.eid=cw_source_relation.eid_from AND cw_source_relation.eid_to=cw_CWSource.cw_eid') |
43 |
43 |
44 if applcubicwebversion == (3, 6, 0) and cubicwebversion >= (3, 6, 0): |
44 if applcubicwebversion == (3, 6, 0) and cubicwebversion >= (3, 6, 0): |