Browse Source

[FIX] also migrate id sequences

pull/1040/head
Holger Brunn 10 years ago
committed by Enric Tobella
parent
commit
bf845ce103
No known key found for this signature in database GPG Key ID: 1A2546A1B7BA2451
  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