fix scope.removeForeignKey method (#1841)

This commit is contained in:
Shane 2018-04-16 07:20:02 -07:00 committed by Jinzhu
parent 919c6db4f8
commit 6842b49a1a
1 changed files with 1 additions and 1 deletions

View File

@ -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