Copy the flake migration from the flake branch

hydra.nixos.org is already running this rev, and it should be safe to
apply to everyone else. If we make changes to this migration, we'll
need to write another migration anyway.
This commit is contained in:
Graham Christensen
2020-02-09 15:17:24 -05:00
parent 2b4f14963b
commit 6fe57ab5fa
4 changed files with 47 additions and 11 deletions

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

@@ -0,0 +1,7 @@
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));
alter table JobsetEvals add column flake text;