mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
fix: use bigint for uint32 and uint16 in postgres driver (#4301)
This commit is contained in:
@@ -112,11 +112,11 @@ func (d *Postgres) atTypeC(c1 *Column, c2 *schema.Column) error {
|
||||
switch c1.Type {
|
||||
case field.TypeBool:
|
||||
t = &schema.BoolType{T: postgres.TypeBoolean}
|
||||
case field.TypeUint8, field.TypeInt8, field.TypeInt16, field.TypeUint16:
|
||||
case field.TypeUint8, field.TypeInt8, field.TypeInt16:
|
||||
t = &schema.IntegerType{T: postgres.TypeSmallInt}
|
||||
case field.TypeInt32, field.TypeUint32:
|
||||
case field.TypeUint16, field.TypeInt32:
|
||||
t = &schema.IntegerType{T: postgres.TypeInt}
|
||||
case field.TypeInt, field.TypeUint, field.TypeInt64, field.TypeUint64:
|
||||
case field.TypeUint32, field.TypeInt, field.TypeUint, field.TypeInt64, field.TypeUint64:
|
||||
t = &schema.IntegerType{T: postgres.TypeBigInt}
|
||||
case field.TypeFloat32:
|
||||
t = &schema.FloatType{T: c1.scanTypeOr(postgres.TypeReal)}
|
||||
|
||||
Reference in New Issue
Block a user