[migration] handle non-existing attribute type when adding an entity type
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 17 Dec 2015 17:14:08 +0100
changeset 11002 2973522a1924
parent 11001 37c5c9b3b3bf
child 11003 53820b08a723
[migration] handle non-existing attribute type when adding an entity type The final type needs to be added to the schema first. Related to #7569998.
server/migractions.py
--- a/server/migractions.py	Wed Dec 09 17:44:17 2015 +0100
+++ b/server/migractions.py	Thu Dec 17 17:14:08 2015 +0100
@@ -811,6 +811,8 @@
             # ignore those meta relations, they will be automatically added
             if rschema.type in META_RTYPES:
                 continue
+            if not attrschema.type in instschema:
+                self.cmd_add_entity_type(attrschema.type, False, False)
             if not rschema.type in instschema:
                 # need to add the relation type and to commit to get it
                 # actually in the schema