Browse Source

Merge pull request #2 from hbrunn/8.0-auditlog

[FIX] also migrate id sequences
pull/119/head
Sébastien Alix 10 years ago
parent
commit
f0e04ee486
  1. 6
      auditlog/__init__.py

6
auditlog/__init__.py

@ -30,7 +30,13 @@ def pre_init_hook(cr):
def migrate_from_audittrail(cr):
cr.execute('ALTER TABLE audittrail_rule RENAME TO auditlog_rule')
cr.execute('ALTER TABLE audittrail_rule_id_seq '
'RENAME TO auditlog_rule_id_seq')
cr.execute('ALTER TABLE auditlog_rule RENAME COLUMN object_id TO model_id')
cr.execute('ALTER TABLE audittrail_log RENAME TO auditlog_log')
cr.execute('ALTER TABLE audittrail_log_id_seq '
'RENAME TO auditlog_log_id_seq')
cr.execute('ALTER TABLE auditlog_log RENAME COLUMN object_id TO model_id')
cr.execute('ALTER TABLE audittrail_log_line RENAME TO auditlog_log_line')
cr.execute('ALTER TABLE audittrail_log_line_id_seq '
'RENAME TO auditlog_log_line_id_seq')
Loading…
Cancel
Save