diff --git a/dialect_postgres.go b/dialect_postgres.go index d6f403684..97aa295b0 100644 --- a/dialect_postgres.go +++ b/dialect_postgres.go @@ -1131,7 +1131,7 @@ func (db *postgres) GetIndexes(tableName string) (map[string]*core.Index, error) return nil, err } indexName = strings.Trim(indexName, `" `) - if strings.HasSuffix(indexName, "_pkey") { + if strings.HasSuffix(indexName, "_pkey") || strings.HasSuffix(indexName, "primary") { continue } if strings.HasPrefix(indexdef, "CREATE UNIQUE INDEX") {