Builds.jobset_id: make not-null

This commit is contained in:
Graham Christensen
2020-02-05 15:25:52 -05:00
parent 2cdcc7f188
commit 8ef08f1385
3 changed files with 13 additions and 11 deletions

View File

@ -170,7 +170,7 @@ create table Builds (
-- Info about the inputs.
project text not null,
jobset text not null,
jobset_id integer null,
jobset_id integer not null,
job text not null,
-- Info about the build result.

7
src/sql/upgrade-64.sql Normal file
View File

@ -0,0 +1,7 @@
-- Make the Builds.jobset_id column NOT NULL. If this upgrade fails,
-- either the admin didn't run the backfiller or there is a bug. If
-- the admin ran the backfiller and there are null columns, it is
-- very important to figure out where the nullable columns came from.
ALTER TABLE Builds
ALTER COLUMN jobset_id SET NOT NULL;