[schema] Move Group to SubjectGroup, related to #3455804
authorVincent Michel <vincent.michel@logilab.fr>
Mon, 20 Jan 2014 15:52:37 +0000
changeset 654 c37872b4298a
parent 653 3de64284bc26
child 655 e67e2ca69e1f
[schema] Move Group to SubjectGroup, related to #3455804
importers/random_import.py
migration/0.7.0_Any.py
schema.py
--- a/importers/random_import.py	Tue Jan 14 18:33:30 2014 +0100
+++ b/importers/random_import.py	Mon Jan 20 15:52:37 2014 +0000
@@ -356,7 +356,7 @@
     ###############################################################################
     groups = []
     for ind in range(NB_SUBJECTS_GROUPS):
-        groups.append(store.create_entity('Group', identifier=u'demo_group_%s' % ind,
+        groups.append(store.create_entity('SubjectGroup', identifier=u'demo_group_%s' % ind,
                                           name=u'Demo group of subjects %s' % ind).eid)
     subjects = []
     for ind in range(NB_SUBJECTS):
--- a/migration/0.7.0_Any.py	Tue Jan 14 18:33:30 2014 +0100
+++ b/migration/0.7.0_Any.py	Mon Jan 20 15:52:37 2014 +0000
@@ -17,7 +17,13 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
 sync_schema_props_perms(('QuestionnaireRun', 'concerns', 'Subject'))
-sync_schema_props_perms(('QuestionnaireRun', 'concerns', 'Group'))
+sync_schema_props_perms(('QuestionnaireRun', 'concerns', 'SubjectGroup'))
+
+sync_schema_props_perms(('Scan', 'concerns', 'Subject'))
+sync_schema_props_perms(('Scan', 'concerns', 'SubjectGroup'))
+
+sync_schema_props_perms(('GenomicMeasure', 'concerns', 'Subject'))
+sync_schema_props_perms(('GenomicMeasure', 'concerns', 'SubjectGroup'))
 
 sync_schema_props_perms(('Assessment', 'generates', 'QuestionnaireRun'))
 sync_schema_props_perms(('Assessment', 'generates', 'Scan'))
--- a/schema.py	Tue Jan 14 18:33:30 2014 +0100
+++ b/schema.py	Mon Jan 20 15:52:37 2014 +0000
@@ -40,11 +40,11 @@
 ProcessingRun.add_relation(SubjectRelation('GenomicMeasure', cardinality='**'), name='outputs')
 
 # Maesure -> Subject
-QuestionnaireRun.add_relation(SubjectRelation(('Subject', 'Group'), cardinality='1*',
+QuestionnaireRun.add_relation(SubjectRelation(('Subject', 'SubjectGroup'), cardinality='1*',
                                               inlined=True, composite='object'), name='concerns')
-Scan.add_relation(SubjectRelation(('Subject', 'Group'), cardinality='1*', inlined=True,
+Scan.add_relation(SubjectRelation(('Subject', 'SubjectGroup'), cardinality='1*', inlined=True,
                                   composite='object'), name='concerns')
-GenomicMeasure.add_relation(SubjectRelation(('Subject', 'Group'), cardinality='1*', inlined=True,
+GenomicMeasure.add_relation(SubjectRelation(('Subject', 'SubjectGroup'), cardinality='1*', inlined=True,
                                             composite='object'), name='concerns')
 
 # Assessment -> Measure