[migration] ensure the in_state WF is set on Training entities (closes #5447352)
authorDavid Douard <david.douard@logilab.fr>
Mon, 08 Jun 2015 15:12:07 +0200
changeset 73 bc1e0f04bd49
parent 72 e472e97a5116
child 74 06f3abbb787a
[migration] ensure the in_state WF is set on Training entities (closes #5447352)
migration/0.7.1_Any.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/migration/0.7.1_Any.py	Mon Jun 08 15:12:07 2015 +0200
@@ -0,0 +1,7 @@
+if 'Training' not in schema:
+    add_entity_type('Training')
+
+# workflows doen't understand yams inheritance
+rql('SET WF workflow_of ET, ET default_workflow WF '
+    'WHERE WF workflow_of WC, WC name "Workcase", ET name "Training"')
+commit()