From 2aad872da50499ce0f2c4a380ee6ca73ebd47285 Mon Sep 17 00:00:00 2001 From: Ariel Mashraki <7413593+a8m@users.noreply.github.com> Date: Wed, 6 Jan 2021 15:28:26 +0200 Subject: [PATCH] dialect/sql/schema: combine binary and varbinary to one clause (#1140) --- dialect/sql/schema/mysql.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dialect/sql/schema/mysql.go b/dialect/sql/schema/mysql.go index fba939f12..ce6667480 100644 --- a/dialect/sql/schema/mysql.go +++ b/dialect/sql/schema/mysql.go @@ -405,9 +405,6 @@ func (d *MySQL) scanColumn(c *Column, rows *sql.Rows) error { case "tinyblob": c.Size = math.MaxUint8 c.Type = field.TypeBytes - case "binary": - c.Size = size - c.Type = field.TypeBytes case "blob": c.Size = math.MaxUint16 c.Type = field.TypeBytes @@ -417,7 +414,7 @@ func (d *MySQL) scanColumn(c *Column, rows *sql.Rows) error { case "longblob": c.Size = math.MaxUint32 c.Type = field.TypeBytes - case "varbinary": + case "binary", "varbinary": c.Type = field.TypeBytes c.Size = size case "varchar":