1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:00:54 +00:00

Merge branch 'master' into develop

This commit is contained in:
astaxie 2014-06-30 23:50:45 +08:00
commit 34936dde35
2 changed files with 5 additions and 1 deletions

View File

@ -148,6 +148,10 @@ func getDbCreateSql(al *alias) (sqls []string, tableIndexes map[string][]dbIndex
column += " " + "NOT NULL" column += " " + "NOT NULL"
} }
if fi.initial.String() != "" {
column += " DEFAULT " + fi.initial.String()
}
if fi.unique { if fi.unique {
column += " " + "UNIQUE" column += " " + "UNIQUE"
} }

View File

@ -603,7 +603,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if !findrouter { if !findrouter {
if t, ok := p.routers[r.Method]; ok { 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 { if r, ok := runObject.(*controllerInfo); ok {
routerInfo = r routerInfo = r
findrouter = true findrouter = true