Implementing elseif for conversion of Default (#1173)

Before this commit the Default would be reset to 0 every time it is not true. This results in an issue when true is converted to 1 and 1 is not true, resulting in a conversion to 0.

Signed-off-by: Christopher Dziomba <christopher.dziomba@gmail.com>
This commit is contained in:
Christopher 2018-12-11 15:18:29 +01:00 committed by Lunny Xiao
parent fd49db598f
commit 401f4ee8ff
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ func (db *mssql) SqlType(c *core.Column) string {
res = core.Bit res = core.Bit
if strings.EqualFold(c.Default, "true") { if strings.EqualFold(c.Default, "true") {
c.Default = "1" c.Default = "1"
} else { } else if strings.EqualFold(c.Default, "false") {
c.Default = "0" c.Default = "0"
} }
case core.Serial: case core.Serial: