Files
onepanel/db/go/20201214133458_fix_jupyterlab_gpu.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

31 lines
902 B
Go

package migration
import (
"database/sql"
"github.com/pressly/goose"
"path/filepath"
)
func initialize20201214133458() {
if _, ok := initializedMigrations[20201214133458]; !ok {
goose.AddMigration(Up20201214133458, Down20201214133458)
initializedMigrations[20201214133458] = true
}
}
// Up20201214133458 fixes an issue where LD_LIBRARY_PATH is not present for JupyterLab
func Up20201214133458(tx *sql.Tx) error {
// This code is executed when the migration is applied.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "jupyterlab", "20201214133458.yaml"),
jupyterLabTemplateName)
}
// Down20201214133458 undoes the change
func Down20201214133458(tx *sql.Tx) error {
// This code is executed when the migration is rolled back.
return updateWorkspaceTemplateManifest(
filepath.Join("workspaces", "jupyterlab", "20201031165106.yaml"),
jupyterLabTemplateName)
}