mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
add mysql and postgres impls
This commit is contained in:
parent
3d2753fd59
commit
a05cdafd92
2 changed files with 22 additions and 0 deletions
11
store/datastore/ddl/mysql/files/013_add_column_repo_seq.sql
Normal file
11
store/datastore/ddl/mysql/files/013_add_column_repo_seq.sql
Normal 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
|
||||
)
|
|
@ -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
|
||||
)
|
Loading…
Reference in a new issue