fix migrate failed and org dashboard failed on MSSQL database (#1448)

This commit is contained in:
Lunny Xiao 2017-04-06 18:47:25 -07:00 committed by GitHub
parent cf6699fb4f
commit 5acfc7c4bc
36 changed files with 1999 additions and 1634 deletions

View file

@ -180,6 +180,20 @@ func isStructZero(v reflect.Value) bool {
return true
}
func isArrayValueZero(v reflect.Value) bool {
if !v.IsValid() || v.Len() == 0 {
return true
}
for i := 0; i < v.Len(); i++ {
if !isZero(v.Index(i).Interface()) {
return false
}
}
return true
}
func int64ToIntValue(id int64, tp reflect.Type) reflect.Value {
var v interface{}
switch tp.Kind() {