# HG changeset patch # User Julien Cristau # Date 1389878344 -3600 # Node ID d8c0784038f41bf0ddc27afc99626a4ba06644fb # Parent 3861ebfd6aa856bb99476775819cc187c294f6f4 [migration/3.18] recover from bad CWSource.in_synchronization default value The addition of this attribute in 3.13.8 had default=False, which made no sense, and was fixed in 3.13.9. However no migration was done so apps that ever saw the 3.13.8 code could still have '' as defaultval for this attribute. diff -r 3861ebfd6aa8 -r d8c0784038f4 misc/migration/3.18.0_Any.py --- a/misc/migration/3.18.0_Any.py Thu Jan 16 11:54:06 2014 +0100 +++ b/misc/migration/3.18.0_Any.py Thu Jan 16 14:19:04 2014 +0100 @@ -7,6 +7,9 @@ add_relation_definition('CWAttribute', 'add_permission', 'CWGroup') add_relation_definition('CWAttribute', 'add_permission', 'RQLExpression') +# a bad defaultval in 3.13.8 schema was fixed in 3.13.9, but the migration was missed +rql('SET ATTR defaultval NULL WHERE ATTR from_entity E, E name "CWSource", ATTR relation_type T, T name "in_synchronization"') + # the migration gets confused when we change rdefs out from under it. So # explicitly remove this size constraint so it doesn't stick around and break # things later.