Files
onepanel/db/go/20201115134934_add_tensorboard_to_tfod.go
Andrey Melnikov ca5f602738 fix: separated workflow templates and workspace templates for yaml resources for migrations.
Also updated migration yamls to the latest based on templates repo.
2020-12-25 16:32:15 -08:00

33 lines
828 B
Go

package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20201115134934() {
if _, ok := initializedMigrations[20201115134934]; !ok {
goose.AddMigration(Up20201115134934, Down20201115134934)
initializedMigrations[20201115134934] = true
}
}
// Up20201115134934 add TensorBoard sidecar to TFODs
func Up20201115134934(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkflowTemplateManifest(
filepath.Join("workflows", "tf-object-detection-training", "20201115134934.yaml"),
tensorflowObjectDetectionWorkflowTemplateName,
map[string]string{
"used-by": "cvat",
},
)
}
// Down20201115134934 do nothing
func Down20201115134934(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return nil
}