[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.
This commit is contained in:
xmo-odoo 2021-08-25 15:59:22 +02:00 committed by GitHub
parent bef6a8e2d0
commit e5f84dc380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
'name': 'merge bot',
'version': '1.6',
'version': '1.7',
'depends': ['contacts', 'website'],
'data': [
'security/security.xml',

View File

@ -0,0 +1,6 @@
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")