You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-12 22:21:40 +02:00
add migration function to remove null repo counters
This commit is contained in:
@ -104,6 +104,10 @@ var migrations = []struct {
|
||||
name: "update-table-set-repo-seq",
|
||||
stmt: updateTableSetRepoSeq,
|
||||
},
|
||||
{
|
||||
name: "update-table-set-repo-seq-default",
|
||||
stmt: updateTableSetRepoSeqDefault,
|
||||
},
|
||||
}
|
||||
|
||||
// Migrate performs the database migration. If the migration fails
|
||||
@ -490,3 +494,8 @@ UPDATE repos SET repo_counter = (
|
||||
WHERE builds.build_repo_id = repos.repo_id
|
||||
)
|
||||
`
|
||||
|
||||
var updateTableSetRepoSeqDefault = `
|
||||
UPDATE repos SET repo_counter = 0
|
||||
WHERE repo_counter IS NULL
|
||||
`
|
||||
|
Reference in New Issue
Block a user