mirror of
https://github.com/odoo/runbot.git
synced 2025-03-17 00:15:47 +07:00

Currently, if a PR forward-port PR gets detached the reason for it is not always obvious, and may have to be hunted in the logs or in "sibling" PRs. By writing a forward port reason (hopefully) ever time we detach a PR, and displaying that reason in the form and dashboard, the justification should be a lot more obvious. Fixes #679
12 lines
363 B
Python
12 lines
363 B
Python
def migrate(cr, version):
|
|
""" Add a dummy detach reason to detached PRs.
|
|
"""
|
|
cr.execute(
|
|
"ALTER TABLE runbot_merge_pull_requests"
|
|
" ADD COLUMN detach_reason varchar"
|
|
)
|
|
cr.execute(
|
|
"UPDATE runbot_merge_pull_requests"
|
|
" SET detach_reason = 'unknown'"
|
|
" WHERE source_id IS NOT NULL AND parent_id IS NULL")
|