Migration must create history record
When we manipulate data with raw SQL query, we must ensure to also update the history table if there is one (we can not rely on
_history attribute as it can be set in another module).
For that we may use
ModelSQL._insert_history but it may be missing some fields that are added in other modules so we should adapt the method to use common columns between both tables.
PaymentTermLineRelativeDelta migration from 3.4 is an example which create trouble when used with
account_invoice_history because the ORM is always reading value from the history table which is not available.