From 9c69905749b1e81fade31cac7013bac3c50ec0cc Mon Sep 17 00:00:00 2001 From: Stephanie You Date: Fri, 27 Oct 2023 16:11:32 -0700 Subject: [PATCH] match tables by name --- go/libraries/doltcore/diff/table_deltas.go | 10 ++++------ integration-tests/bats/import-create-tables.bats | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/go/libraries/doltcore/diff/table_deltas.go b/go/libraries/doltcore/diff/table_deltas.go index e6f610377e..46edbcd1d6 100644 --- a/go/libraries/doltcore/diff/table_deltas.go +++ b/go/libraries/doltcore/diff/table_deltas.go @@ -270,12 +270,10 @@ func matchTableDeltas(fromDeltas, toDeltas []TableDelta) (deltas []TableDelta) { for _, name := range matchedNames { t := to[name] f := from[name] - if schemasOverlap(t.ToSch, f.FromSch) { - matched := match(t, f) - deltas = append(deltas, matched) - delete(from, f.FromName) - delete(to, t.ToName) - } + matched := match(t, f) + deltas = append(deltas, matched) + delete(from, f.FromName) + delete(to, t.ToName) } for _, f := range from { diff --git a/integration-tests/bats/import-create-tables.bats b/integration-tests/bats/import-create-tables.bats index a4931b4748..f407e4253b 100755 --- a/integration-tests/bats/import-create-tables.bats +++ b/integration-tests/bats/import-create-tables.bats @@ -793,7 +793,6 @@ DELIM } @test "import-create-tables: created table with force option can be added and committed as modified" { - skip "overwritten table cannot be added and committed as modified" run dolt table import -c --pk=id test `batshelper jails.csv` [ "$status" -eq 0 ] [[ "$output" =~ "Import completed successfully." ]] || false