dialect/entsql: add support for index-type annotation

This commit is contained in:
Ariel Mashraki
2022-02-22 13:41:11 +02:00
committed by Ariel Mashraki
parent d80f7cc41a
commit fe2511fc8d
5 changed files with 97 additions and 0 deletions

View File

@@ -779,5 +779,8 @@ func (d *Postgres) atIndex(idx1 *Index, t2 *schema.Table, idx2 *schema.Index) er
}
idx2.AddParts(&schema.IndexPart{C: c2})
}
if t, ok := indexType(idx1, dialect.Postgres); ok {
idx2.AddAttrs(&postgres.IndexType{T: t})
}
return nil
}