Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,10 @@ def migrate_feature_table(self):
'''
feature_table = self.configDB.get_table('FEATURE')
for feature, config in feature_table.items():
state = config.pop('status', 'disabled')
config['state'] = state
state = config.get('status')
if state is not None:
config['state'] = state
config.pop('status')
Comment thread
yxieca marked this conversation as resolved.
Outdated
self.configDB.set_entry('FEATURE', feature, config)

container_feature_table = self.configDB.get_table('CONTAINER_FEATURE')
Expand Down Expand Up @@ -286,7 +288,8 @@ def common_migration_ops(self):
# Override init config with current config.
# This will leave new fields from init_config
# in new_config, but not override existing configuration.
new_cfg = {**init_cfg, **curr_cfg}
new_cfg = init_cfg.copy()
new_cfg.update(curr_cfg)
self.configDB.set_entry(init_cfg_table, key, new_cfg)

def migrate(self):
Expand Down