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 `