[postcreate] properly set is_instance_of for bootstrap entities
Entities created before CWEType itself need the is/is_instance_of
relations created later. We were actually only inserting "is".
Closes #7656606.
--- a/misc/migration/postcreate.py Wed Oct 28 17:39:30 2015 +0000
+++ b/misc/migration/postcreate.py Wed Oct 21 17:21:18 2015 +0200
@@ -33,8 +33,8 @@
sql('INSERT INTO %s_relation '
'SELECT X.eid, ET.cw_eid FROM entities as X, cw_CWEType as ET '
'WHERE X.type=ET.cw_name AND NOT EXISTS('
- ' SELECT 1 from is_relation '
- ' WHERE eid_from=X.eid AND eid_to=ET.cw_eid)' % rtype)
+ ' SELECT 1 from %s_relation '
+ ' WHERE eid_from=X.eid AND eid_to=ET.cw_eid)' % (rtype, rtype))
# user workflow
userwf = add_workflow(_('default user workflow'), 'CWUser')