1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-18 08:26:45 +02:00
woodpecker/store/datastore/sql/postgres/files/counts.sql

15 lines
215 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
WHERE repo_active = true
2017-05-03 23:25:33 +02:00
-- name: count-builds
SELECT currval('builds_build_id_seq');