1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-24 10:07:21 +02:00
woodpecker/store/datastore/sql/postgres/files/counts.sql

16 lines
229 B
MySQL
Raw Normal View History

2017-05-03 23:25:33 +02:00
-- name: count-users
SELECT reltuples
2017-07-25 21:32:22 +02:00
FROM pg_class WHERE relname = 'users'
2017-05-03 23:25:33 +02:00
-- name: count-repos
2017-07-25 21:32:22 +02:00
SELECT count(1)
2017-07-25 21:37:58 +02:00
FROM repos
2017-07-25 21:32:22 +02:00
WHERE repo_active = 1
2017-05-03 23:25:33 +02:00
-- name: count-builds
SELECT reltuples
2017-07-25 21:32:22 +02:00
FROM pg_class WHERE relname = 'builds'