Skip to content

Commit ae2230d

Browse files
committed
PR feedback
1 parent b4f5200 commit ae2230d

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

go.mod

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ require (
4242
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
4343
)
4444

45+
replace github.com/dolthub/vitess => ../vitess
46+
47+
replace github.com/dolthub/vitess => ../vitess
48+
4549
go 1.23.3

sql/plan/alter_foreign_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ func FindForeignKeyColMapping(
546546
indexPos, ok := indexColMap[destFkCol]
547547
if !ok {
548548
// Same as above, renaming a referenced column would cause this error
549-
return nil, nil, fmt.Errorf("inde x column `%s` in foreign key `%s` cannot be found",
549+
return nil, nil, fmt.Errorf("index column `%s` in foreign key `%s` cannot be found",
550550
destFKCols[fkIdx], fkName)
551551
}
552552
indexPositions[indexPos] = localRowPos

sql/plan/foreign_key_editor.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,15 +598,15 @@ func GetForeignKeyTypeConversions(
598598
childType := childSch[childIndex].Type
599599
parentType := parentSch[parentIndex].Type
600600

601-
childExtendedType, _ := childType.(types.ExtendedType)
601+
childExtendedType, ok := childType.(types.ExtendedType)
602602
// if even one of the types is not an extended type, then we can't transform any values
603-
if childExtendedType == nil {
603+
if !ok {
604604
return nil, nil
605605
}
606606

607607
if !childType.Equals(parentType) {
608-
parentExtendedType, _ := parentType.(types.ExtendedType)
609-
if parentExtendedType == nil {
608+
parentExtendedType, ok := parentType.(types.ExtendedType)
609+
if !ok {
610610
// this should be impossible (child and parent should both be extended types), but just in case
611611
return nil, nil
612612
}

0 commit comments

Comments
 (0)