mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
dialect/sql/schema: correctly read uint32 type in migration (#289)
Fixes #287
This commit is contained in:
@@ -294,6 +294,9 @@ func (d *MySQL) scanColumn(c *Column, rows *sql.Rows) error {
|
||||
}); parts[0] {
|
||||
case "int":
|
||||
c.Type = field.TypeInt32
|
||||
if len(parts) == 3 { // int(10) unsigned.
|
||||
c.Type = field.TypeUint32
|
||||
}
|
||||
case "smallint":
|
||||
c.Type = field.TypeInt16
|
||||
if len(parts) == 3 { // smallint(5) unsigned.
|
||||
|
||||
Reference in New Issue
Block a user