Add missing files
Doh!
This commit is contained in:
33
src/sql/upgrade-9.sql
Normal file
33
src/sql/upgrade-9.sql
Normal file
@ -0,0 +1,33 @@
|
||||
create table BuildOutputs (
|
||||
build integer not null,
|
||||
name text not null,
|
||||
path text not null,
|
||||
primary key (build, name),
|
||||
foreign key (build) references Builds(id) on delete cascade
|
||||
);
|
||||
|
||||
insert into BuildOutputs (build, name, path)
|
||||
select id, 'out', outPath from Builds;
|
||||
|
||||
alter table Builds drop column outPath;
|
||||
|
||||
create table BuildStepOutputs (
|
||||
build integer not null,
|
||||
stepnr integer not null,
|
||||
name text not null,
|
||||
path text not null,
|
||||
primary key (build, stepnr, name),
|
||||
foreign key (build) references Builds(id) on delete cascade,
|
||||
foreign key (build, stepnr) references BuildSteps(build, stepnr) on delete cascade
|
||||
);
|
||||
|
||||
insert into BuildStepOutputs (build, stepnr, name, path)
|
||||
select build, stepnr, 'out', outPath from BuildSteps where outPath is not null;
|
||||
|
||||
drop index IndexBuildStepsOnBuild;
|
||||
drop index IndexBuildStepsOnOutpath;
|
||||
drop index IndexBuildStepsOnOutpathBuild;
|
||||
|
||||
alter table BuildSteps drop column outPath;
|
||||
|
||||
create index IndexBuildStepOutputsOnPath on BuildStepOutputs(path);
|
Reference in New Issue
Block a user