From 005a28a638e4957fd83e4c7d2290d51f9175332a Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 25 Jul 2017 15:37:58 -0400 Subject: [PATCH] fix postgres repo count --- store/datastore/sql/postgres/files/counts.sql | 2 +- store/datastore/sql/postgres/sql_gen.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/store/datastore/sql/postgres/files/counts.sql b/store/datastore/sql/postgres/files/counts.sql index 6ae97fc0f..469438f03 100644 --- a/store/datastore/sql/postgres/files/counts.sql +++ b/store/datastore/sql/postgres/files/counts.sql @@ -6,7 +6,7 @@ FROM pg_class WHERE relname = 'users' -- name: count-repos SELECT count(1) -FROM repo +FROM repos WHERE repo_active = 1 -- name: count-builds diff --git a/store/datastore/sql/postgres/sql_gen.go b/store/datastore/sql/postgres/sql_gen.go index f8b01c8ed..6f3db3806 100644 --- a/store/datastore/sql/postgres/sql_gen.go +++ b/store/datastore/sql/postgres/sql_gen.go @@ -89,7 +89,7 @@ FROM pg_class WHERE relname = 'users' var countRepos = ` SELECT count(1) -FROM repo +FROM repos WHERE repo_active = 1 `