Commit 4b15663c authored by Jérome Perrin's avatar Jérome Perrin

upgrader: upgrade catalog schema right after installing BTs

If updating business templates brings new tables that are required for
catalog / alarm system to work, then we may not be able to execute the
post upgrade alarm, so TemplateToolTableConsistencyConstraint won't be
able to update the schema.
parent c99fb916
bt5_list, keep_bt5_id_set = context.Base_getUpgradeBusinessTemplateList()
template_tool = context.getPortalObject().portal_templates
return template_tool.upgradeSite(bt5_list,
# First, upgrade business templates
message_list = template_tool.upgradeSite(bt5_list,
delete_orphaned=True,
keep_bt5_id_set=keep_bt5_id_set,
dry_run=(not fixit))
if fixit:
# if We have installed some business templates, we must also update
# the catalog tables structures in the same transaction, because these tables
# might be required for alarm framework to work and we may not be able to
# execute the post upgrade alarm.
message_list.extend(
template_tool.TemplateTool_checkTableConsistency(fixit=fixit))
return message_list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment