runbot/runbot_merge/migrations/13.0.1.7/pre-migration.py
xmo-odoo e5f84dc380
[FIX] runbot_merge: add migration for draft column (#523)
Draft was added in 82174ae66e but turns
out the v13 ORM is not able to create a required column (even when
given a default value), at least for booleans.

So create it by hand.
2021-08-25 15:59:22 +02:00

7 lines
272 B
Python

def migrate(cr, version):
""" Create draft column manually because the v13 orm can't handle the power
of adding new required columns
"""
cr.execute("ALTER TABLE runbot_merge_pull_requests"
" ADD COLUMN draft BOOLEAN NOT NULL DEFAULT false")