equal
deleted
inserted
replaced
72 |
72 |
73 # Set object type to "Bytes" for CWAttribute's "defaultval" attribute |
73 # Set object type to "Bytes" for CWAttribute's "defaultval" attribute |
74 rql('SET X to_entity B WHERE X is CWAttribute, X from_entity Y, Y name "CWAttribute", ' |
74 rql('SET X to_entity B WHERE X is CWAttribute, X from_entity Y, Y name "CWAttribute", ' |
75 'X relation_type Z, Z name "defaultval", B name "Bytes", NOT X to_entity B') |
75 'X relation_type Z, Z name "defaultval", B name "Bytes", NOT X to_entity B') |
76 |
76 |
77 schema['defaultval'].rdefs.values()[0].object = schema['Bytes'] |
77 oldrdef = schema['CWAttribute'].rdef('defaultval') |
|
78 import yams.buildobjs as ybo |
|
79 newrdef = ybo.RelationDefinition('CWAttribute', 'defaultval', 'Bytes') |
|
80 newrdef.eid = oldrdef.eid |
|
81 schema.add_relation_def(newrdef) |
|
82 schema.del_relation_def('CWAttribute', 'defaultval', 'String') |
78 |
83 |
79 commit() |
84 commit() |
80 |
85 |
81 sync_schema_props_perms('defaultval') |
86 sync_schema_props_perms('defaultval') |
82 |
87 |