From 231960a0c2ede7abe1e981760f73191bdbc68f94 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 23 Jul 2021 15:17:03 +0800 Subject: [PATCH] Fix types --- dialects/dameng.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dialects/dameng.go b/dialects/dameng.go index 8ef5a8c2..c3f7423f 100644 --- a/dialects/dameng.go +++ b/dialects/dameng.go @@ -553,14 +553,16 @@ func (db *dameng) Version(ctx context.Context, queryer core.Queryer) (*schemas.V func (db *dameng) SQLType(c *schemas.Column) string { var res string switch t := c.SQLType.Name; t { - case schemas.TinyInt, "BYTE", schemas.Bool: + case schemas.TinyInt, "BYTE": res = "TINYINT" case schemas.SmallInt, schemas.MediumInt, schemas.Int, schemas.Integer: return "INTEGER" - case schemas.Bit, schemas.BigInt, + case schemas.BigInt, schemas.UnsignedBigInt, schemas.UnsignedBit, schemas.UnsignedInt, schemas.Serial, schemas.BigSerial: res = "BIGINT" + case schemas.Bit, schemas.Bool: + return schemas.Bit case schemas.Binary, schemas.VarBinary, schemas.Blob, schemas.TinyBlob, schemas.MediumBlob, schemas.LongBlob, schemas.Bytea: return schemas.Binary case schemas.Date: