1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

migrate seq number

This commit is contained in:
Brad Rydzewski 2017-05-18 02:18:41 +02:00
parent 729d759985
commit 3d2753fd59

View File

@ -0,0 +1,11 @@
-- 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
)