32 rdef.rtype = schema.rschema(rtype) |
32 rdef.rtype = schema.rschema(rtype) |
33 rdef.subject = schema.eschema(subjtype) |
33 rdef.subject = schema.eschema(subjtype) |
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 |
|
38 if applcubicwebversion < (3, 9, 6) and cubicwebversion >= (3, 9, 6): |
|
39 add_entity_type('CWUniqueTogetherConstraint') |
37 |
40 |
38 if applcubicwebversion == (3, 6, 0) and cubicwebversion >= (3, 6, 0): |
41 if applcubicwebversion == (3, 6, 0) and cubicwebversion >= (3, 6, 0): |
39 CSTRMAP = dict(rql('Any T, X WHERE X is CWConstraintType, X name T', |
42 CSTRMAP = dict(rql('Any T, X WHERE X is CWConstraintType, X name T', |
40 ask_confirm=False)) |
43 ask_confirm=False)) |
41 _add_relation_definition_no_perms('CWAttribute', 'update_permission', 'CWGroup') |
44 _add_relation_definition_no_perms('CWAttribute', 'update_permission', 'CWGroup') |