fix compatibility #1292

This commit is contained in:
袁帆 2019-05-07 14:10:52 +08:00
parent 6a1dd59737
commit d08bdc5a59
1 changed files with 1 additions and 1 deletions

View File

@ -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("primary") {
continue
}
if strings.HasPrefix(indexdef, "CREATE UNIQUE INDEX") {