[migration] Fix based_on relation cubicweb-brainomics-debian-version-0.9.0-1 cubicweb-brainomics-version-0.9.0
authorVladimir Popescu <vladimir.popescu@logilab.fr>
Thu, 24 Apr 2014 16:05:33 +0200
changeset 863 e96dc490df9a
parent 857 a9d0ec7257cf
child 866 cae90d88a178
[migration] Fix based_on relation
migration/0.9.0_Any.py
--- a/migration/0.9.0_Any.py	Tue Apr 22 16:32:57 2014 +0000
+++ b/migration/0.9.0_Any.py	Thu Apr 24 16:05:33 2014 +0200
@@ -16,9 +16,6 @@
 # You should have received a copy of the GNU Lesser General Public License along
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 
-add_relation_definition('Diagnostic', 'performed_on', 'QuestionnaireRun')
-add_relation_definition('Diagnostic', 'performed_on', 'Scan')
-add_relation_definition('Diagnostic', 'performed_on', 'GenomicMeasure')
 add_relation_definition('TechnicalAnalysis', 'performed_on', 'QuestionnaireRun')
 add_relation_definition('TechnicalAnalysis', 'performed_on', 'Scan')
 add_relation_definition('TechnicalAnalysis', 'performed_on', 'GenomicMeasure')
@@ -41,16 +38,12 @@
 
 remove_cube('file')
 
-sync_schema_props_perms(('Diagnostic', 'performed_on', 'QuestionnaireRun'))
-sync_schema_props_perms(('Diagnostic', 'performed_on', 'Scan'))
-sync_schema_props_perms(('Diagnostic', 'performed_on', 'GenomicMeasure'))
 sync_schema_props_perms('concerns')
 sync_schema_props_perms('uses')
 sync_schema_props_perms('comments')
-# rename_relation_type is for relation type only
-drop_relation_definition('Diagnostic', 'performed_on', 'QuestionnaireRun')
-drop_relation_definition('Diagnostic', 'performed_on', 'Scan')
-drop_relation_definition('Diagnostic', 'performed_on', 'GenomicMeasure')
 add_relation_definition('Diagnostic', 'based_on', 'QuestionnaireRun')
 add_relation_definition('Diagnostic', 'based_on', 'Scan')
 add_relation_definition('Diagnostic', 'based_on', 'GenomicMeasure')
+sync_schema_props_perms(('Diagnostic', 'based_on', 'QuestionnaireRun'))
+sync_schema_props_perms(('Diagnostic', 'based_on', 'Scan'))
+sync_schema_props_perms(('Diagnostic', 'based_on', 'GenomicMeasure'))