From 6842b49a1ad0feb6b93be830fe63a682cf853ada Mon Sep 17 00:00:00 2001 From: Shane Date: Mon, 16 Apr 2018 07:20:02 -0700 Subject: [PATCH] fix scope.removeForeignKey method (#1841) --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index 2f39e073..397ccf0b 100644 --- a/scope.go +++ b/scope.go @@ -1215,7 +1215,7 @@ func (scope *Scope) addForeignKey(field string, dest string, onDelete string, on } func (scope *Scope) removeForeignKey(field string, dest string) { - keyName := scope.Dialect().BuildKeyName(scope.TableName(), field, dest) + keyName := scope.Dialect().BuildKeyName(scope.TableName(), field, dest, "foreign") if !scope.Dialect().HasForeignKey(scope.TableName(), keyName) { return