diff --git a/migrations/14.0.1.0.0/post-migration.py b/migrations/14.0.1.0.0/post-migration.py deleted file mode 100644 index 4863fd14c0624be76d9020c510aa553c006be564..0000000000000000000000000000000000000000 --- a/migrations/14.0.1.0.0/post-migration.py +++ /dev/null @@ -1,67 +0,0 @@ -# © 2022 Le Filament (<http://www.le-filament.com>) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade # pylint: disable=W7936 - - -def scop_cotisation_cg_exo_map_values(env): - openupgrade.map_values( - env.cr, - openupgrade.get_legacy_name("quarter_exo_start"), - "quarter_exo_start", - [ - (1, "1"), - (2, "2"), - (3, "3"), - (4, "4"), - ], - table="scop_cotisation_cg_exo", - ) - openupgrade.map_values( - env.cr, - openupgrade.get_legacy_name("quarter_exo_end"), - "quarter_exo_end", - [ - (1, "1"), - (2, "2"), - (3, "3"), - (4, "4"), - ], - table="scop_cotisation_cg_exo", - ) - openupgrade.map_values( - env.cr, - openupgrade.get_legacy_name("year_exo_start"), - "year_exo_start", - [ - (2017, "2017"), - (2018, "2018"), - (2019, "2019"), - (2020, "2020"), - (2021, "2021"), - (2022, "2022"), - (2023, "2023"), - (2024, "2024"), - ], - table="scop_cotisation_cg_exo", - ) - openupgrade.map_values( - env.cr, - openupgrade.get_legacy_name("year_exo_end"), - "year_exo_end", - [ - (2017, "2017"), - (2018, "2018"), - (2019, "2019"), - (2020, "2020"), - (2021, "2021"), - (2022, "2022"), - (2023, "2023"), - (2024, "2024"), - ], - table="scop_cotisation_cg_exo", - ) - -@openupgrade.migrate() -def migrate(env, version): - scop_cotisation_cg_exo_map_values(env) diff --git a/migrations/14.0.1.0.0/pre-migration.py b/migrations/14.0.1.0.0/pre-migration.py deleted file mode 100644 index a0643181413888baf1386eb08740edcb4d88e99a..0000000000000000000000000000000000000000 --- a/migrations/14.0.1.0.0/pre-migration.py +++ /dev/null @@ -1,13 +0,0 @@ -# © 2022 Le Filament (<http://www.le-filament.com>) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - -column_renames = { - "scop_cotisation_cg_exo": [("quarter_exo_start", None), ("quarter_exo_end", None), ("year_exo_start", None), ("year_exo_end", None)], -} - - -@openupgrade.migrate() -def migrate(env, version): - openupgrade.rename_columns(env.cr, column_renames)