feat(index): implement GIN index support for quoted text columns and enhance index column resolution

This commit is contained in:
2026-05-05 11:32:15 +02:00
parent 53ff745d5d
commit 608893a3d6
5 changed files with 105 additions and 4 deletions

View File

@@ -604,7 +604,7 @@ func buildIndexColumnExpressions(table *models.Table, index *models.Index, index
for _, colName := range index.Columns {
colExpr := colName
if table != nil {
if col, ok := table.Columns[colName]; ok && col != nil {
if col, ok := resolveIndexColumn(table, colName); ok && col != nil {
colExpr = col.SQLName()
if strings.EqualFold(indexType, "gin") && isTextType(col.Type) {
opClass := extractOperatorClass(index.Comment)