From 67147aae7d730283acc133eff928268fd265a481 Mon Sep 17 00:00:00 2001 From: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:03:42 +0200 Subject: [PATCH] a couple OK tests Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --- go/vt/schemadiff/schema_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/go/vt/schemadiff/schema_test.go b/go/vt/schemadiff/schema_test.go index 6a94dd0de05..1710cec12c7 100644 --- a/go/vt/schemadiff/schema_test.go +++ b/go/vt/schemadiff/schema_test.go @@ -526,12 +526,21 @@ func TestInvalidSchema(t *testing.T) { { schema: `create table t1 (id int primary key, CONSTRAINT const_id CHECK (id > 0))`, }, + { + schema: `create table t1 (id int primary key, CONSTRAINT const_id1 CHECK (id > 0), CONSTRAINT const_id2 CHECK (id < 10));`, + }, { schema: ` create table t1 (id int primary key, CONSTRAINT const_id CHECK (id > 0), CONSTRAINT const_id CHECK (id < 10)); `, expectErr: &DuplicateCheckConstraintNameError{Table: "t1", Constraint: "const_id"}, }, + { + schema: ` + create table t1 (id int primary key, CONSTRAINT const_id1 CHECK (id > 0)); + create table t2 (id int primary key, CONSTRAINT const_id2 CHECK (id > 0)); + `, + }, { schema: ` create table t1 (id int primary key, CONSTRAINT const_id CHECK (id > 0));