diff --git a/loyalty_multi_gift/migrations/16.0.1.0.0/post-migration.py b/loyalty_multi_gift/migrations/16.0.1.0.0/post-migration.py new file mode 100644 index 000000000..0265c52b5 --- /dev/null +++ b/loyalty_multi_gift/migrations/16.0.1.0.0/post-migration.py @@ -0,0 +1,16 @@ +# Copyright 2024 Tecnativa - Pilar Vargas +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.logged_query( + env.cr, + """ + INSERT INTO loyalty_reward_product_line_product_product_rel + (loyalty_reward_product_line_id, product_product_id) + SELECT coupon_reward_product_line_id, product_product_id + FROM coupon_reward_product_line_product_product_rel + """, + )