Skip to content

Commit

Permalink
Merge pull request #223 from Tecnativa/16.0-fix-loyalty_multi_gift
Browse files Browse the repository at this point in the history
[16.0][FIX] loyalty_multi_gift: Transfer m2m data to new table
  • Loading branch information
pedrobaeza authored Jul 15, 2024
2 parents bac5695 + 97035d1 commit 0682456
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions loyalty_multi_gift/migrations/16.0.1.0.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -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
""",
)

0 comments on commit 0682456

Please sign in to comment.