Files
onepanel/db/go/20201113094916_update_cvat_onepanel_sdk.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

32 lines
948 B
Go

package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20201113094916() {
if _, ok := initializedMigrations[20201113094916]; !ok {
goose.AddMigration(Up20201113094916, Down20201113094916)
initializedMigrations[20201113094916] = true
}
}
//Up20201113094916 updates CVAT with python-sdk 0.15.0
//Of note, this replaces the authentication request endpoint.
func Up20201113094916(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20201113094916.yaml"),
cvatTemplateName)
}
//Down20201113094916 updates CVAT back to previous python-sdk version of 0.14.0
func Down20201113094916(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "cvat", "20201102104048.yaml"),
cvatTemplateName)
}