[migration] fix handling of default value for boolean attributes
We can't assert that the old value is 'True' or 'False', because False
used to be stored as an empty string in pre-3.18 versions.
--- a/misc/migration/3.18.0_Any.py Thu Dec 12 12:34:38 2013 +0100
+++ b/misc/migration/3.18.0_Any.py Thu Dec 12 14:25:24 2013 +0100
@@ -8,7 +8,8 @@
return
atype = cwattr.to_entity[0].name
if atype == 'Boolean':
- assert default in ('True', 'False'), default
+ # boolean attributes with default=False were stored as ''
+ assert default in ('True', 'False', ''), repr(default)
default = default == 'True'
elif atype in ('Int', 'BigInt'):
default = int(default)