Browse Source

修改用户邮箱数据库长度

Minho 8 years ago
parent
commit
ec1d99c0aa
2 changed files with 4 additions and 4 deletions
  1. 3 3
      commands/command.go
  2. 1 1
      models/member.go

+ 3 - 3
commands/command.go

@@ -64,7 +64,7 @@ func Initialization()  {
 
 
 	if err := models.NewOption().InsertMulti(options...);err != nil {
-		beego.Error(err)
+		panic("Option.InsertMulti => " + err.Error())
 		os.Exit(1)
 	}
 
@@ -76,7 +76,7 @@ func Initialization()  {
 	member.Email = "[email protected]"
 
 	if err := member.Add();err != nil {
-		panic(err)
+		panic("Member.Add => " + err.Error())
 		os.Exit(0)
 	}
 
@@ -98,7 +98,7 @@ func Initialization()  {
 	book.Theme	= "default"
 
 	if err := book.Insert(); err != nil {
-		panic(err)
+		panic("Book.Insert => " + err.Error())
 		os.Exit(0)
 	}
 }

+ 1 - 1
models/member.go

@@ -17,7 +17,7 @@ type Member struct {
 	Account string 		`orm:"size(100);unique;column(account)" json:"account"`
 	Password string 	`orm:"size(1000);column(password)" json:"-"`
 	Description string	`orm:"column(description);size(2000)" json:"description"`
-	Email string 		`orm:"size(255);column(email);unique" json:"email"`
+	Email string 		`orm:"size(100);column(email);unique" json:"email"`
 	Phone string 		`orm:"size(255);column(phone);null;default(null)" json:"phone"`
 	Avatar string 		`orm:"size(1000);column(avatar)" json:"avatar"`
 	//用户角色:0 超级管理员 /1 管理员/ 2 普通用户 .