Files
portainer/api/bolt/migratoree/rollback.go
T
Chaim Lev-Ari 3b670c1f54 feat(db): add flag to rollback to ce edition (#39)
* feat(db): add flag to rollback to ce edition

* refactor(db): make backup of db

* style(api): remove comments

* refactor(db): export backup function

Co-authored-by: yi-portainer <yi.chen@portainer.io>
2020-11-03 14:05:42 +13:00

21 lines
375 B
Go

package migratoree
import (
"github.com/portainer/portainer/api"
)
// Rollback rolls back the db to portainer CE latest db version
func (m *Migrator) Rollback() error {
err := m.versionService.StoreDBVersion(portainer.DBVersion)
if err != nil {
return err
}
err = m.versionService.StoreEdition(portainer.PortainerCE)
if err != nil {
return err
}
return nil
}