mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
removed builds table since not being used in the near term
This commit is contained in:
@@ -80,21 +80,12 @@ var stmts = []string{`
|
||||
,commit_updated INTEGER
|
||||
,UNIQUE(commit_sha, commit_branch, repo_id)
|
||||
);`, `
|
||||
CREATE TABLE IF NOT EXISTS builds (
|
||||
build_id INTEGER PRIMARY KEY AUTOINCREMENT
|
||||
CREATE TABLE IF NOT EXISTS output (
|
||||
output_id INTEGER PRIMARY KEY AUTOINCREMENT
|
||||
,commit_id INTEGER
|
||||
,build_number INTEGER
|
||||
,build_matrix VARCHAR(255)
|
||||
,build_status VARCHAR(255)
|
||||
,build_console BLOB
|
||||
,build_started INTEGER
|
||||
,build_finished INTEGER
|
||||
,build_duration INTEGER
|
||||
,build_created INTEGER
|
||||
,build_updated INTEGER
|
||||
,UNIQUE(commit_id, build_number)
|
||||
,output_raw BLOB
|
||||
,UNIQUE(commit_id)
|
||||
);`,
|
||||
`CREATE INDEX IF NOT EXISTS builds_commit_id ON builds (commit_id)`,
|
||||
}
|
||||
|
||||
func Load(db *sql.DB) {
|
||||
|
||||
9
server/database/testdata/testdata.go
vendored
9
server/database/testdata/testdata.go
vendored
@@ -31,12 +31,9 @@ var stmts = []string{
|
||||
"insert into commits values (4, 1, 'Success', 1398065345, 1398069999, 854, 'd12c9e5a11982f71796ad909c93551b16fba053e', 'dev', '', 'drcooper@caltech.edu', 'ab23a88a3ed77ecdfeb894c0eaf2817a', 'Wed Apr 23 02:00:00 2014 -0700', 'a commit message', '', 1398065343, 1398065344);",
|
||||
"insert into commits values (5, 1, 'Started', 1398065345, 0, 0, '85f8c029b902ed9400bc600bac301a0aadb144ac', 'master', '', 'drcooper@caltech.edu', 'ab23a88a3ed77ecdfeb894c0eaf2817a', 'Wed Apr 23 03:00:00 2014 -0700', 'a commit message', '', 1398065343, 1398065344);",
|
||||
|
||||
// insert build entries
|
||||
"insert into builds values (1, 2, 1, '', 'Success', 'some output', 1398065345, 1398069999, 854, 1398065343, 1398065344);",
|
||||
"insert into builds values (2, 2, 2, '', 'Success', 'some output', 1398065345, 1398069999, 854, 1398065343, 1398065344);",
|
||||
"insert into builds values (3, 2, 3, '', 'Success', 'some output', 1398065345, 1398069999, 854, 1398065343, 1398065344);",
|
||||
"insert into builds values (4, 1, 1, '', 'Success', 'some output', 1398065345, 1398069999, 854, 1398065343, 1398065344);",
|
||||
"insert into builds values (5, 3, 1, '', 'Started', 'some output', 1398065345, 0, 0, 1398065343, 1398065344);",
|
||||
// insert commit console output
|
||||
"insert into output values (1, 1, 'sample console output');",
|
||||
"insert into output values (2, 2, 'sample console output.....');",
|
||||
}
|
||||
|
||||
// Load will populate the database with a fixed dataset for
|
||||
|
||||
Reference in New Issue
Block a user