Feat: Decide whether to do database migration based on version.lock

This commit is contained in:
HFO4
2019-11-09 19:04:48 +08:00
parent c5493fd1f1
commit e858cbe2cf
18 changed files with 127 additions and 26 deletions

11
pkg/conf/version.go Normal file
View File

@@ -0,0 +1,11 @@
package conf
import "io/ioutil"
const BackendVersion = string("3.0.0-b")
// WriteVersionLock 将当前版本信息写入 version.lock
func WriteVersionLock() error {
err := ioutil.WriteFile("version.lock", []byte(BackendVersion), 0644)
return err
}