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

If a status is defined as `optional`, then the PR is considered valid if the status is never sent, but *if* the status is sent then it becomes required. Note that as ever this is a per-commit requirement, so it's mostly useful for conditional statuses. Fixes #1062
13 lines
283 B
Python
13 lines
283 B
Python
def migrate(cr, _version):
|
|
cr.execute("""
|
|
ALTER TABLE runbot_merge_repository_status
|
|
ALTER COLUMN prs TYPE varchar;
|
|
|
|
UPDATE runbot_merge_repository_status
|
|
SET prs =
|
|
CASE prs
|
|
WHEN 'true' THEN 'required'
|
|
ELSE 'ignored'
|
|
END;
|
|
""")
|