-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] migrate_translations_to_jsonb: avoid ir_translation terms cleanup #374
[FIX] migrate_translations_to_jsonb: avoid ir_translation terms cleanup #374
Conversation
openupgradelib/openupgrade_160.py
Outdated
env.cr, field | ||
) | ||
for query in migrate_queries: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this empty line
There's a limitation here as the core method executes a query inside the method that expects the table |
I recommend then that this method renames the table before, and restores it after. |
We're making use of core's `_get_translation_upgrade_queries` which aside from provide the proper queries to upgrade the translated fields to the new json structure tries to cleanup the former ir_tanslation records. In OpenUpgrade we try to keep historic info after migration so we're able to quickly react to possible inconsistencies. Besides that, we need to rename the `ir_translation` table if we want to work with this method. TT49615
7b2b12b
to
743bf56
Compare
Now that I see the diff, why previous approach replacing inside the query didn't serve? |
See the code I linked in my previous comment. There's a query execution inside the method that we can't change |
OK, understood @marielejeune FYI |
We're making use of core's
_get_translation_upgrade_queries
which aside from provide the proper queries to upgrade the translated fields to the new json structure tries to cleanup the former ir_tanslation records.In OpenUpgrade we try to keep historic info after migration so we're able to quickly react to possible inconsistencies.
cc @Tecnativa TT49615