Skip to content

Commit

Permalink
schemadiff: validating case-sensitive view names (#13208)
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <[email protected]>
  • Loading branch information
shlomi-noach authored Jun 5, 2023
1 parent ce91fcd commit 6061d95
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions go/vt/schemadiff/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,22 @@ func TestDiffSchemas(t *testing.T) {
"CREATE TABLE `t4` (\n\t`id` int,\n\tPRIMARY KEY (`id`)\n)",
},
},
{
// Making sure schemadiff distinguishes between VIEWs with different casing
name: "case insensitive views",
from: "create view v1 as select * from t; create table t(id int primary key); create view V1 as select * from t",
to: "",
diffs: []string{
"drop view v1",
"drop view V1",
"drop table t",
},
cdiffs: []string{
"DROP VIEW `v1`",
"DROP VIEW `V1`",
"DROP TABLE `t`",
},
},
}
for _, ts := range tt {
t.Run(ts.name, func(t *testing.T) {
Expand Down

0 comments on commit 6061d95

Please sign in to comment.