[migration/3.18] protect against attributes in db missing from fsschema
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 23 Jan 2014 10:53:24 +0100
changeset 9477 07fc991612b0
parent 9476 33a7db07201e
child 9483 bb6fd9d32ba9
[migration/3.18] protect against attributes in db missing from fsschema Happens if a previous migration forgot a drop_attribute. Closes #3471609
misc/migration/3.18.0_Any.py
--- a/misc/migration/3.18.0_Any.py	Tue Jan 21 18:39:32 2014 +0100
+++ b/misc/migration/3.18.0_Any.py	Thu Jan 23 10:53:24 2014 +0100
@@ -138,4 +138,7 @@
 # all attributes perms have to be refreshed ...
 for rschema in schema.relations():
     if rschema.final:
-        sync_schema_props_perms(rschema.type, syncprops=False)
+        if rschema.type in fsschema:
+            sync_schema_props_perms(rschema.type, syncprops=False, ask_confirm=False)
+        else:
+            print 'WARNING: attribute %s missing from fs schema' % rschema.type