Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: ct/go/db/db.go

Issue 1411423003: [CT] Add ability to run unlanded benchmarks on Chromium Perf (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Fix errcheck Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 package db 1 package db
2 2
3 /* 3 /*
4 Store/Retrieve Cluster Telemetry Frontend data in a database. 4 Store/Retrieve Cluster Telemetry Frontend data in a database.
5 */ 5 */
6 6
7 import ( 7 import (
8 "github.com/jmoiron/sqlx" 8 "github.com/jmoiron/sqlx"
9 "go.skia.org/infra/go/database" 9 "go.skia.org/infra/go/database"
10 ) 10 )
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 var v10_up = []string{ 244 var v10_up = []string{
245 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf32`, 245 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf32`,
246 } 246 }
247 247
248 var v10_down = []string{ 248 var v10_down = []string{
249 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf8`, 249 `ALTER TABLE ChromiumPerfTasks CONVERT TO CHARACTER SET utf8`,
250 } 250 }
251 251
252 var v11_up = []string{
253 `ALTER TABLE ChromiumPerfTasks ADD benchmark_patch longtext NOT NULL DEF AULT ""`,
254 }
255
256 var v11_down = []string{
257 `ALTER TABLE ChromiumPerfTasks DROP benchmark_patch`,
258 }
259
252 // Define the migration steps. 260 // Define the migration steps.
253 // Note: Only add to this list, once a step has landed in version control it 261 // Note: Only add to this list, once a step has landed in version control it
254 // must not be changed. 262 // must not be changed.
255 var migrationSteps = []database.MigrationStep{ 263 var migrationSteps = []database.MigrationStep{
256 // version 1. Create Chromium Perf tables. 264 // version 1. Create Chromium Perf tables.
257 { 265 {
258 MySQLUp: v1_up, 266 MySQLUp: v1_up,
259 MySQLDown: v1_down, 267 MySQLDown: v1_down,
260 }, 268 },
261 // version 2. Create Admin Task tables. 269 // version 2. Create Admin Task tables.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 // version 9: Change chromium_patch, blink_patch and skia_patch to longt ext in ChromiumPerfTasks table. 304 // version 9: Change chromium_patch, blink_patch and skia_patch to longt ext in ChromiumPerfTasks table.
297 { 305 {
298 MySQLUp: v9_up, 306 MySQLUp: v9_up,
299 MySQLDown: v9_down, 307 MySQLDown: v9_down,
300 }, 308 },
301 // version 10: Convert character set in ChromiumPerfTasks from utf8 to u tf32. 309 // version 10: Convert character set in ChromiumPerfTasks from utf8 to u tf32.
302 { 310 {
303 MySQLUp: v10_up, 311 MySQLUp: v10_up,
304 MySQLDown: v10_down, 312 MySQLDown: v10_down,
305 }, 313 },
314 // version 11: Add benchmark_patch column to ChromiumPerfTasks.
315 {
316 MySQLUp: v11_up,
317 MySQLDown: v11_down,
318 },
306 } 319 }
307 320
308 // MigrationSteps returns the database migration steps. 321 // MigrationSteps returns the database migration steps.
309 func MigrationSteps() []database.MigrationStep { 322 func MigrationSteps() []database.MigrationStep {
310 return migrationSteps 323 return migrationSteps
311 } 324 }
OLDNEW
« no previous file with comments | « ct/go/ctfe/chromium_perf/chromium_perf.go ('k') | ct/go/master_scripts/run_chromium_perf_on_workers/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698