misc/migration/3.15.0_common.py
author Julien Cristau <julien.cristau@logilab.fr>
Wed, 13 Nov 2013 12:39:30 +0100
branchstable
changeset 9336 722635e530a0
parent 8410 eb6a607a0067
permissions -rw-r--r--
[server] Add missing indices for undo support (closes #3259691) The tables used by the 'undo' feature were missing some indices, which among other things triggered repeated sequential scans when deleting old transactions.

import ConfigParser
try:
    undo_actions = config.cfgfile_parser.get('MAIN', 'undo-support', False)
except ConfigParser.NoOptionError:
    pass # this conf. file was probably already migrated
else:
    config.global_set_option('undo-enabled', bool(undo_actions))