Fix db2
This commit is contained in:
parent
1abb80f258
commit
815db53e9d
|
@ -67,11 +67,13 @@ func (db *db2) SQLType(c *schemas.Column) string {
|
||||||
return schemas.BigInt
|
return schemas.BigInt
|
||||||
case schemas.UnsignedInt:
|
case schemas.UnsignedInt:
|
||||||
return schemas.BigInt
|
return schemas.BigInt
|
||||||
|
case schemas.Int, schemas.Integer:
|
||||||
|
return schemas.Integer
|
||||||
case schemas.Bit, schemas.Bool, schemas.Boolean:
|
case schemas.Bit, schemas.Bool, schemas.Boolean:
|
||||||
res = schemas.Boolean
|
res = schemas.Boolean
|
||||||
return res
|
return res
|
||||||
case schemas.Binary, schemas.VarBinary:
|
case schemas.Binary:
|
||||||
return schemas.Bytea
|
res = schemas.Binary
|
||||||
case schemas.DateTime:
|
case schemas.DateTime:
|
||||||
res = schemas.TimeStamp
|
res = schemas.TimeStamp
|
||||||
case schemas.TimeStampz:
|
case schemas.TimeStampz:
|
||||||
|
@ -82,8 +84,13 @@ func (db *db2) SQLType(c *schemas.Column) string {
|
||||||
res = schemas.Varchar
|
res = schemas.Varchar
|
||||||
case schemas.Uuid:
|
case schemas.Uuid:
|
||||||
return schemas.Uuid
|
return schemas.Uuid
|
||||||
|
case schemas.VarBinary, schemas.Bytea:
|
||||||
|
res = schemas.VarBinary
|
||||||
|
if c.Length == 0 {
|
||||||
|
return res + "(MAX)"
|
||||||
|
}
|
||||||
case schemas.Blob, schemas.TinyBlob, schemas.MediumBlob, schemas.LongBlob:
|
case schemas.Blob, schemas.TinyBlob, schemas.MediumBlob, schemas.LongBlob:
|
||||||
return schemas.Bytea
|
return schemas.Blob
|
||||||
default:
|
default:
|
||||||
res = t
|
res = t
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue