mirror of
https://github.com/ent/ent.git
synced 2026-05-04 08:30:57 +03:00
dialect/entsql: add support for partial indexes (#2944)
This commit is contained in:
@@ -796,6 +796,9 @@ func (d *Postgres) atIndex(idx1 *Index, t2 *schema.Table, idx2 *schema.Index) er
|
||||
}
|
||||
idx2.AddAttrs(&postgres.IndexInclude{Columns: columns})
|
||||
}
|
||||
if idx1.Annotation != nil && idx1.Annotation.Where != "" {
|
||||
idx2.AddAttrs(&postgres.IndexPredicate{P: idx1.Annotation.Where})
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user