Correct AUTO_INCREMENT for Uint64 and Int64
This commit is contained in:
parent
2061731e2e
commit
f83842b48e
@ -39,9 +39,11 @@ func (sqlite3) DataTypeOf(field *StructField) string {
|
||||
case reflect.Int64, reflect.Uint64:
|
||||
sqlType = "bigint"
|
||||
if field.IsPrimaryKey {
|
||||
field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT"
|
||||
if _, ok := field.TagSettings["AUTO_INCREMENT"]; ok {
|
||||
sqlType = "integer primary key autoincrement"
|
||||
} else {
|
||||
sqlType += "integer primary key"
|
||||
}
|
||||
}
|
||||
case reflect.Float32, reflect.Float64:
|
||||
sqlType = "real"
|
||||
|
Loading…
x
Reference in New Issue
Block a user