mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-06-13 02:49:37 +00:00
5fe712cca6
* Refactor: move store/ to server/store/ * fix pipeline for moved tests Co-authored-by: 6543 <6543@obermui.de>
17 lines
351 B
SQL
17 lines
351 B
SQL
-- name: alter-table-add-repo-seq
|
|
|
|
ALTER TABLE repos ADD COLUMN repo_counter INTEGER;
|
|
|
|
-- name: update-table-set-repo-seq
|
|
|
|
UPDATE repos SET repo_counter = (
|
|
SELECT max(build_number)
|
|
FROM builds
|
|
WHERE builds.build_repo_id = repos.repo_id
|
|
)
|
|
|
|
-- name: update-table-set-repo-seq-default
|
|
|
|
UPDATE repos SET repo_counter = 0
|
|
WHERE repo_counter IS NULL
|