forked from lix-project/hydra
aaacf9eda3
This denormalises the database, but it's the best we can do until PostgreSQL has materialised views.
8 lines
225 B
SQL
8 lines
225 B
SQL
alter table JobsetEvals
|
|
add column nrBuilds integer,
|
|
add column nrSucceeded integer;
|
|
|
|
update JobsetEvals e set
|
|
nrBuilds = (select count(*) from JobsetEvalMembers m where e.id = m.eval)
|
|
where hasNewBuilds = 1;
|