diff --git a/migrate/sqlschema/inspector.go b/migrate/sqlschema/inspector.go index cf809a343..d76d9dc7e 100644 --- a/migrate/sqlschema/inspector.go +++ b/migrate/sqlschema/inspector.go @@ -111,10 +111,10 @@ func (si *SchemaInspector) Inspect(ctx context.Context) (State, error) { } var fromCols, toCols []string - for _, f := range rel.BaseFields { + for _, f := range rel.BasePKs { fromCols = append(fromCols, f.Name) } - for _, f := range rel.JoinFields { + for _, f := range rel.JoinPKs { toCols = append(toCols, f.Name) }