Remove support for views

They're replaced by aggregates, which are declarative, faster, and
have a better interface.
This commit is contained in:
Eelco Dolstra
2014-04-23 23:21:06 +02:00
parent 5e0d10a392
commit affec8881d
11 changed files with 4 additions and 907 deletions

View File

@ -372,57 +372,6 @@ create table SystemTypes (
);
-- Views are a mechanism to automatically group related builds
-- together. A view definition consists of a build of some "primary"
-- job, plus all builds of the other jobs named in ViewJobs that have
-- that build as an input. If there are multiple builds matching a
-- ViewJob, then we take the oldest successful build, or the oldest
-- unsuccessful build if there is no successful build.
create table Views (
project text not null,
name text not null,
description text,
-- If true, don't garbage-collect builds included in this view.
keep integer not null default 0,
primary key (project, name),
foreign key (project) references Projects(name) on delete cascade on update cascade
);
create table ViewJobs (
project text not null,
view_ text not null,
job text not null,
-- A constraint on the job consisting of `name=value' pairs,
-- e.g. "system=i686-linux officialRelease=true". Should really
-- be a separate table but I'm lazy.
attrs text not null,
-- If set, this is the primary job for the view. There can be
-- only one such job per view.
isPrimary integer not null default 0,
description text,
jobset text not null,
-- If set, once there is a successful build for every job
-- associated with a build of the view's primary job, that set of
-- builds is automatically added as a release to the Releases
-- table.
autoRelease integer not null default 0,
primary key (project, view_, job, attrs),
foreign key (project) references Projects(name) on delete cascade on update cascade,
foreign key (project, view_) references Views(project, name) on delete cascade on update cascade
);
-- A release is a named set of builds. The ReleaseMembers table lists
-- the builds that constitute each release.
create table Releases (