mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
26 lines
710 B
Go
26 lines
710 B
Go
package migrations
|
|
|
|
import (
|
|
"errors"
|
|
"path/filepath"
|
|
|
|
"github.com/yusing/go-proxy/internal/common"
|
|
"github.com/yusing/go-proxy/pkg"
|
|
)
|
|
|
|
var (
|
|
HomepageJSONConfigPathOld = filepath.Join(common.ConfigDir, ".homepage.json")
|
|
IconListCachePathOld = filepath.Join(common.ConfigDir, ".icon_list_cache.json")
|
|
IconCachePathOld = filepath.Join(common.ConfigDir, ".icon_cache.json")
|
|
)
|
|
|
|
func m001_move_json_data() error {
|
|
if version.IsOlderThan(pkg.Version{Major: 0, Minor: 11, Patch: 0}) {
|
|
return errors.Join(
|
|
mv(HomepageJSONConfigPathOld, common.HomepageJSONConfigPath),
|
|
mv(IconListCachePathOld, common.IconListCachePath),
|
|
mv(IconCachePathOld, common.IconCachePath),
|
|
)
|
|
}
|
|
return nil
|
|
}
|