mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
Migration script field online_raw_data -> raw_data
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"UPDATE account_bank_statement_line SET raw_data={online_raw_data}".format(
|
||||
online_raw_data=openupgrade.get_legacy_name("online_raw_data")
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
_column_renames = {
|
||||
"account_bank_statement_line": [
|
||||
("online_raw_data", None),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
if not version:
|
||||
return
|
||||
openupgrade.rename_columns(env.cr, _column_renames)
|
||||
Reference in New Issue
Block a user