Add flake configuration to the web interface
This commit is contained in:
+6
-2
@@ -54,8 +54,8 @@ create table Jobsets (
|
||||
name text not null,
|
||||
project text not null,
|
||||
description text,
|
||||
nixExprInput text not null, -- name of the jobsetInput containing the Nix or Guix expression
|
||||
nixExprPath text not null, -- relative path of the Nix or Guix expression
|
||||
nixExprInput text, -- name of the jobsetInput containing the Nix or Guix expression
|
||||
nixExprPath text, -- relative path of the Nix or Guix expression
|
||||
errorMsg text, -- used to signal the last evaluation error etc. for this jobset
|
||||
errorTime integer, -- timestamp associated with errorMsg
|
||||
lastCheckedTime integer, -- last time the evaluator looked at this jobset
|
||||
@@ -70,7 +70,11 @@ create table Jobsets (
|
||||
fetchErrorMsg text,
|
||||
forceEval boolean,
|
||||
startTime integer, -- if jobset is currently running
|
||||
type integer not null default 0, -- 0 == legacy, 1 == flake
|
||||
flake text,
|
||||
check (schedulingShares > 0),
|
||||
check ((type = 0) = (nixExprInput is not null and nixExprPath is not null)),
|
||||
check ((type = 1) = (flake is not null)),
|
||||
primary key (project, name),
|
||||
foreign key (project) references Projects(name) on delete cascade on update cascade
|
||||
#ifdef SQLITE
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
alter table Jobsets alter column nixExprInput drop not null;
|
||||
alter table Jobsets alter column nixExprPath drop not null;
|
||||
alter table Jobsets add column type integer default 0;
|
||||
alter table Jobsets add column flake text;
|
||||
alter table Jobsets add check ((type = 0) = (nixExprInput is not null and nixExprPath is not null));
|
||||
alter table Jobsets add check ((type = 1) = (flake is not null));
|
||||
Reference in New Issue
Block a user