Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
fix migration for build.completed_status
Browse files Browse the repository at this point in the history
  • Loading branch information
karenetheridge committed Nov 12, 2020
1 parent 9efc2c2 commit 668d2a8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/migrations/0176-build-completed_status.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 668d2a8

Please sign in to comment.