mirror of
https://github.com/ent/ent.git
synced 2026-05-04 08:30:57 +03:00
sql/dialect/schema: support setting PK to serial types in postgres (#2748)
This commit is contained in:
@@ -758,6 +758,9 @@ func (d *Postgres) atImplicitIndexName(idx *Index, t1 *Table, c1 *Column) bool {
|
||||
}
|
||||
|
||||
func (d *Postgres) atIncrementC(t *schema.Table, c *schema.Column) {
|
||||
if _, ok := c.Type.Type.(*postgres.SerialType); ok {
|
||||
return
|
||||
}
|
||||
id := &postgres.Identity{}
|
||||
for _, a := range t.Attrs {
|
||||
if a, ok := a.(*postgres.Identity); ok {
|
||||
|
||||
Reference in New Issue
Block a user