修改更新程序

pull/51/head
Minho 2017-05-25 16:26:06 +08:00
parent 4cad76a6f3
commit 22cfd7ddec
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ func sqliteUpdate() {
err := o.Raw("select * from sqlite_master where name='md_members' and sql like '%auth_method%' limit 1").QueryRow(&sqlite_master)
//查询是否已经存在 auth_method 列
if err == nil && sqlite_master.Name == ""{
if err == orm.ErrNoRows{
_,err = o.Raw("ALTER TABLE md_members ADD auth_method VARCHAR(50) DEFAULT 'local' NULL;").Exec()
if err != nil {
panic(fmt.Sprintf("error : 6001 => %s",err.Error()))