mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-18 08:26:45 +02:00
5fe712cca6
* Refactor: move store/ to server/store/ * fix pipeline for moved tests Co-authored-by: 6543 <6543@obermui.de>
62 lines
943 B
SQL
62 lines
943 B
SQL
-- name: repo-update-counter
|
|
|
|
UPDATE repos SET repo_counter = ?
|
|
WHERE repo_counter = ?
|
|
AND repo_id = ?
|
|
|
|
-- name: repo-find-user
|
|
|
|
SELECT
|
|
repo_id
|
|
,repo_user_id
|
|
,repo_owner
|
|
,repo_name
|
|
,repo_full_name
|
|
,repo_avatar
|
|
,repo_link
|
|
,repo_clone
|
|
,repo_branch
|
|
,repo_timeout
|
|
,repo_private
|
|
,repo_trusted
|
|
,repo_active
|
|
,repo_allow_pr
|
|
,repo_hash
|
|
,repo_scm
|
|
,repo_config_path
|
|
,repo_gated
|
|
,repo_visibility
|
|
,repo_counter
|
|
FROM repos
|
|
INNER JOIN perms ON perms.perm_repo_id = repos.repo_id
|
|
WHERE perms.perm_user_id = ?
|
|
ORDER BY repo_full_name ASC
|
|
|
|
-- name: repo-insert-ignore
|
|
|
|
INSERT IGNORE INTO repos (
|
|
repo_user_id
|
|
,repo_owner
|
|
,repo_name
|
|
,repo_full_name
|
|
,repo_avatar
|
|
,repo_link
|
|
,repo_clone
|
|
,repo_branch
|
|
,repo_timeout
|
|
,repo_private
|
|
,repo_trusted
|
|
,repo_active
|
|
,repo_allow_pr
|
|
,repo_hash
|
|
,repo_scm
|
|
,repo_config_path
|
|
,repo_gated
|
|
,repo_visibility
|
|
,repo_counter
|
|
) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
|
|
|
|
-- name: repo-delete
|
|
|
|
DELETE FROM repos WHERE repo_id = ?
|