fix necessary when adding a cube which isn't listed in fs dependencies of the instance
--- a/server/migractions.py Fri Nov 13 09:13:30 2009 +0100
+++ b/server/migractions.py Fri Nov 13 09:15:28 2009 +0100
@@ -526,10 +526,17 @@
sourcescfg[cube] = ask_source_config(cube)
self.config.write_sources_file(sourcescfg)
clear_cache(self.config, 'read_sources_file')
+ # ensure added cube is in config cubes
+ # XXX worth restoring on error?
+ if not cube in self.config._cubes:
+ self.config._cubes += (cube,)
if not update_database:
self.commit()
return
newcubes_schema = self.config.load_schema(construction_mode='non-strict')
+ # XXX we have to replace fs_schema, used in cmd_add_relation_type
+ # etc. and fsschema of migration script contexts
+ self.fs_schema = self._create_context()['fsschema'] = newcubes_schema
new = set()
# execute pre-create files
for pack in reversed(newcubes):