mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-09-26 17:51:13 +08:00
29 lines
725 B
Go
29 lines
725 B
Go
package migration
|
|
|
|
import (
|
|
"database/sql"
|
|
"github.com/pressly/goose"
|
|
"path/filepath"
|
|
)
|
|
|
|
func initialize20201016170415() {
|
|
if _, ok := initializedMigrations[20201016170415]; !ok {
|
|
goose.AddMigration(Up20201016170415, Down20201016170415)
|
|
initializedMigrations[20201016170415] = true
|
|
}
|
|
}
|
|
|
|
// Up20201016170415 updates cvat to a new version
|
|
func Up20201016170415(tx *sql.Tx) error {
|
|
// This code is executed when the migration is applied.
|
|
return updateWorkspaceTemplateManifest(
|
|
filepath.Join("workspaces", "cvat", "20201016170415.yaml"),
|
|
cvatTemplateName)
|
|
}
|
|
|
|
// Down20201016170415 does nothing
|
|
func Down20201016170415(tx *sql.Tx) error {
|
|
// This code is executed when the migration is rolled back.
|
|
return nil
|
|
}
|