修复导致无法安装的严重Bug

This commit is contained in:
刘祥超
2021-08-05 19:53:54 +08:00
parent 5105af9918
commit a9ce2f45df
6 changed files with 7 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ func main() {
fmt.Println("ERROR: " + err.Error())
return
}
err = executor.Run()
err = executor.Run(true)
if err != nil {
fmt.Println("ERROR: " + err.Error())
return

View File

@@ -22,5 +22,5 @@ const (
UserNodeVersion = "0.0.10"
AuthorityNodeVersion = "0.0.2"
MonitorNodeVersion = "0.0.2"
DNSNodeVersion = "0.1.0"
DNSNodeVersion = "0.0.3"
)

View File

@@ -274,7 +274,7 @@ func (this *APINode) autoUpgrade() error {
// 不使用remotelog(),因为此时还没有启动完成
logs.Println("[API_NODE]upgrade database starting ...")
err = setup.NewSQLExecutor(dbConfig).Run()
err = setup.NewSQLExecutor(dbConfig).Run(false)
if err != nil {
return errors.New("execute sql failed: " + err.Error())
}

View File

@@ -93,7 +93,7 @@ func (this *Setup) Run() error {
}
executor := NewSQLExecutor(dbConfig)
err = executor.Run()
err = executor.Run(false)
if err != nil {
return err
}

File diff suppressed because one or more lines are too long

View File

@@ -47,14 +47,14 @@ func NewSQLExecutorFromCmd() (*SQLExecutor, error) {
return NewSQLExecutor(config.DBs[Tea.Env]), nil
}
func (this *SQLExecutor) Run() error {
func (this *SQLExecutor) Run(showLog bool) error {
db, err := dbs.NewInstanceFromConfig(this.dbConfig)
if err != nil {
return err
}
sqlDump := NewSQLDump()
_, err = sqlDump.Apply(db, LatestSQLResult, true)
_, err = sqlDump.Apply(db, LatestSQLResult, showLog)
if err != nil {
return err
}