Skip to content
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Commit 401f4ee

Browse files
chdxD1lunny
authored andcommitted
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 <[email protected]>
1 parent fd49db5 commit 401f4ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dialect_mssql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func (db *mssql) SqlType(c *core.Column) string {
218218
res = core.Bit
219219
if strings.EqualFold(c.Default, "true") {
220220
c.Default = "1"
221-
} else {
221+
} else if strings.EqualFold(c.Default, "false") {
222222
c.Default = "0"
223223
}
224224
case core.Serial:

0 commit comments

Comments
 (0)