don't give NULL on create table column statement

This commit is contained in:
Lunny Xiao 2020-03-26 15:33:35 +08:00
parent d2e3102e72
commit 69ddc3067d
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 1 additions and 5 deletions

View File

@ -270,11 +270,7 @@ func ColumnString(dialect Dialect, col *schemas.Column, includePrimaryKey bool)
}
}
if col.Nullable {
if _, err := bd.WriteString("NULL "); err != nil {
return "", err
}
} else {
if !col.Nullable {
if _, err := bd.WriteString("NOT NULL "); err != nil {
return "", err
}