columnType := migrator.ColumnType{
<snip>
NullableValue: sql.NullBool{Valid: true}, //<--- .Bool implicitly false, i.e. NOT NULL
<snip>
}
matchUpper := strings.ToUpper(matches[3])
if strings.Contains(matchUpper, " NOT NULL") {
columnType.NullableValue = sql.NullBool{Bool: false, Valid: true}
} else if strings.Contains(matchUpper, " NULL") {
columnType.NullableValue = sql.NullBool{Bool: true, Valid: true}
}
...
Description
Sqlite coumns that are neither
NOT NULLorNULLare nullable by default. However,.Nullable()defaults to false and is only settrueif theCREATE TABLEsql explicitly denotes the column asNULLsqlite/ddlmod.go
Line 122 in 397ec6f