See also

When writing migration scripts, you'll often be confronted with repetitive tasks such as checking whether a column or table exists, renaming things, or mapping some old values to new values. It's frustrating and error-prone to reinvent the wheel here; consider using https://github.com/OCA/openupgradelib if you can afford the extra dependency.