• Julien Muchembled's avatar
    CMFActivity: automatic migration of queues and removal of button to recreate tables · 3d644bde
    Julien Muchembled authored
    The action to recreate activity tables while preserving existing messages
    was unsafe for 2 reasons:
    - if any error happened, messages could be lost
    - it relied on Message.reactivate
    
    Which this patch, any instance created after commit d881edd1 (Aug 2010) will
    upgrade successfully. For older instances, make sure you have no activity left.
    
    For cases where 'ALTER TABLE' would not work, a better way to implement repair
    functionality would be:
    - one action to backup all messages in ZODB
    - and another to restore them
    And maybe a security so that during the backup-clear-restore sequence,
    activities can't be created nor processed.
    
    If any column is added in the future, it would still be possible to write code
    that fills them by inspecting messages.
    3d644bde
SQLDict.py 11.8 KB