From 668d2a89503d1c1249c603027741e9be981e0f70 Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Thu, 12 Nov 2020 12:39:51 -0800 Subject: [PATCH] fix migration for build.completed_status --- sql/migrations/0176-build-completed_status.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/migrations/0176-build-completed_status.sql b/sql/migrations/0176-build-completed_status.sql index eaf950e6d..9de19f19f 100644 --- a/sql/migrations/0176-build-completed_status.sql +++ b/sql/migrations/0176-build-completed_status.sql @@ -3,6 +3,8 @@ SELECT run_migration(176, $$ create type completed_status_enum as enum ('failure', 'success'); alter table build add column completed_status completed_status_enum; + update build set completed_status = 'success' where completed is not null; + alter table build add constraint build_completed_xnor_completed_status_check check ((completed is null and completed_status is null) or (completed is not null and completed_status is not null));