Files
onepanel/db/go/20210129094725_update_cvat_workspace.go
2021-01-29 13:47:12 -08:00

31 lines
851 B
Go

package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20210129134326() {
if _, ok := initializedMigrations[20210129134326]; !ok {
goose.AddMigration(Up20210129134326, Down20210129134326)
initializedMigrations[20210129134326] = true
}
}
//Up20210129134326 updates CVAT to latest image
func Up20210129134326(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210129134326.yaml"),
cvatTemplateName)
}
//Down20210129134326 reverts to previous CVAT image
func Down20210129134326(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20210107094725.yaml"),
cvatTemplateName)
}