mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
dialect/sql/schema: use serial underlying types for fks (#2963)
This commit is contained in:
@@ -690,6 +690,9 @@ func (d *Postgres) atTypeC(c1 *Column, c2 *schema.Column) error {
|
||||
return err
|
||||
}
|
||||
c2.Type.Type = t
|
||||
if s, ok := t.(*postgres.SerialType); c1.foreign != nil && ok {
|
||||
c2.Type.Type = s.IntegerType()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
var t schema.Type
|
||||
|
||||
Reference in New Issue
Block a user