[B] migration: add 'descendant_of' relation definition by default cubicweb-keyword-version-1.4.0
authorJulien Jehannet <julien.jehannet@logilab.fr>
Wed, 04 Nov 2009 11:59:58 +0100
changeset 80 cf7bb5b6fba4
parent 79 fbad233eb671
child 81 d3db00ada04f
[B] migration: add 'descendant_of' relation definition by default
migration/1.4.0_Any.py
schema.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/migration/1.4.0_Any.py	Wed Nov 04 11:59:58 2009 +0100
@@ -0,0 +1,4 @@
+for entity in ('Keyword', 'CodeKeyword'):
+    add_relation_definition(entity, 'descendant_of', entity)
+    sync_schema_props_perms(entity)
+checkpoint()
--- a/schema.py	Fri Oct 23 14:44:44 2009 +0200
+++ b/schema.py	Wed Nov 04 11:59:58 2009 +0100
@@ -24,7 +24,6 @@
     classifies = SubjectRelation('CWEType',
                                  # see relation type docstring
                                  constraints = [RQLConstraint('RDEF to_entity O, RDEF relation_type R, R name "applied_to"')])
-    descendant_of = ObjectRelation('Keyword')
 
 
 class classifies(RelationType):