From d08bdc5a59ccd57d2bfb8f4208b22cec9d98f169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E5=B8=86?= Date: Tue, 7 May 2019 14:10:52 +0800 Subject: [PATCH] fix compatibility #1292 --- dialect_postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dialect_postgres.go b/dialect_postgres.go index d6f40368..5487be0c 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("primary") { continue } if strings.HasPrefix(indexdef, "CREATE UNIQUE INDEX") {