Fix build exception

This commit is contained in:
Jinzhu 2018-02-09 22:34:59 +08:00
parent 0e1cb6ece9
commit e9309d361f
1 changed files with 1 additions and 1 deletions

View File

@ -1176,7 +1176,7 @@ func (scope *Scope) addForeignKey(field string, dest string, onDelete string, on
}
func (scope *Scope) removeForeignKey(field string, dest string) {
keyName := scope.Dialect().BuildForeignKeyName(scope.TableName(), field, dest)
keyName := scope.Dialect().BuildKeyName(scope.TableName(), field, dest)
if !scope.Dialect().HasForeignKey(scope.TableName(), keyName) {
return