aboutsummaryrefslogtreecommitdiff
path: root/src/sql/upgrade-10.sql
blob: 0ad299c72168e98bda1b259f23aa7ac8ab79886b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
BEGIN TRANSACTION;

ALTER TABLE Evaluations RENAME COLUMN in_progress TO status;

-- Set all pending evaluations to aborted.
UPDATE Evaluations SET status = 2 WHERE status = 1;

-- All evaluations that did not trigger any build are set to failed.
UPDATE Evaluations SET status = 1 WHERE id NOT IN
(SELECT evaluation FROM Builds);

COMMIT;