From 7b7a95677aecc58d4d52b5dbf3523784ac147258 Mon Sep 17 00:00:00 2001 From: Bin Wang Date: Sun, 22 Jun 2014 10:52:14 +0800 Subject: [PATCH 1/2] Generate default value while run ORM cmd tool --- orm/cmd_utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/orm/cmd_utils.go b/orm/cmd_utils.go index 63cc5a64..0a18264f 100644 --- a/orm/cmd_utils.go +++ b/orm/cmd_utils.go @@ -144,6 +144,10 @@ func getDbCreateSql(al *alias) (sqls []string, tableIndexes map[string][]dbIndex column += " " + "NOT NULL" } + if fi.initial.String() != "" { + column += " DEFAULT " + fi.initial.String() + } + if fi.unique { column += " " + "UNIQUE" } From ac96c2b15ea1ccb1ff656bde4d9866654474098e Mon Sep 17 00:00:00 2001 From: ljyf5593 Date: Fri, 27 Jun 2014 11:06:29 +0800 Subject: [PATCH 2/2] beego: fix #657 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 路由地址不区分大小写问题 --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index 0041c273..3fce6745 100644 --- a/router.go +++ b/router.go @@ -599,7 +599,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) if !findrouter { if t, ok := p.routers[r.Method]; ok { - runObject, p := t.Match(r.URL.Path) + runObject, p := t.Match(strings.ToLower(r.URL.Path)) if r, ok := runObject.(*controllerInfo); ok { routerInfo = r findrouter = true