mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[MIG] account_credit_control: Migration script
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Copyright 2020 Tecnativa - Pedro M. Baeza
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.rename_tables(
|
||||
env.cr, [
|
||||
("credit_control_policy_credit_control_run_rel",
|
||||
"credit_run_policy_rel"),
|
||||
]
|
||||
)
|
||||
openupgrade.rename_columns(
|
||||
env.cr, {
|
||||
"credit_run_policy_rel": [
|
||||
("credit_control_run_id", "run_id,"),
|
||||
("credit_control_policy_id", "policy_id"),
|
||||
]
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user