From 0773e152c292449a908359d762a8f0e33702d1be Mon Sep 17 00:00:00 2001 From: kmr-rohit Date: Sun, 21 Jul 2024 01:04:37 +0530 Subject: [PATCH 1/2] Move most VARBINARY columns to VARCHAR in examples Signed-off-by: kmr-rohit --- .gitignore | 2 +- examples/local/create_commerce_schema.sql | 8 ++++---- examples/operator/create_commerce_schema.sql | 8 ++++---- examples/region_sharding/create_main_schema.sql | 6 +++--- examples/region_sharding/main_vschema_sharded.json | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 70ae13ad32d..9f5feece695 100644 --- a/.gitignore +++ b/.gitignore @@ -76,7 +76,7 @@ _test/ # Local examples /examples/local/vtdataroot - +/examples/region_sharding/vtdataroot /dist/ /vthook/ /bin/ diff --git a/examples/local/create_commerce_schema.sql b/examples/local/create_commerce_schema.sql index d8768d88f82..08961d7bc4c 100644 --- a/examples/local/create_commerce_schema.sql +++ b/examples/local/create_commerce_schema.sql @@ -1,18 +1,18 @@ create table if not exists product( - sku varbinary(128), - description varbinary(128), + sku VARCHAR(128), + description VARCHAR(128), price bigint, primary key(sku) ) ENGINE=InnoDB; create table if not exists customer( customer_id bigint not null auto_increment, - email varbinary(128), + email VARCHAR(128), primary key(customer_id) ) ENGINE=InnoDB; create table if not exists corder( order_id bigint not null auto_increment, customer_id bigint, - sku varbinary(128), + sku VARCHAR(128), price bigint, primary key(order_id) ) ENGINE=InnoDB; diff --git a/examples/operator/create_commerce_schema.sql b/examples/operator/create_commerce_schema.sql index d8768d88f82..08961d7bc4c 100644 --- a/examples/operator/create_commerce_schema.sql +++ b/examples/operator/create_commerce_schema.sql @@ -1,18 +1,18 @@ create table if not exists product( - sku varbinary(128), - description varbinary(128), + sku VARCHAR(128), + description VARCHAR(128), price bigint, primary key(sku) ) ENGINE=InnoDB; create table if not exists customer( customer_id bigint not null auto_increment, - email varbinary(128), + email VARCHAR(128), primary key(customer_id) ) ENGINE=InnoDB; create table if not exists corder( order_id bigint not null auto_increment, customer_id bigint, - sku varbinary(128), + sku VARCHAR(128), price bigint, primary key(order_id) ) ENGINE=InnoDB; diff --git a/examples/region_sharding/create_main_schema.sql b/examples/region_sharding/create_main_schema.sql index 9ee4f8d9450..65718a40091 100644 --- a/examples/region_sharding/create_main_schema.sql +++ b/examples/region_sharding/create_main_schema.sql @@ -1,7 +1,7 @@ CREATE TABLE IF NOT EXISTS customer ( id int NOT NULL, - fullname varbinary(256), - nationalid varbinary(256), - country varbinary(256), + fullname VARCHAR(256), + nationalid VARCHAR(256), + country VARCHAR(256), primary key(id) ); diff --git a/examples/region_sharding/main_vschema_sharded.json b/examples/region_sharding/main_vschema_sharded.json index ec51afa9ee8..a479558ee39 100644 --- a/examples/region_sharding/main_vschema_sharded.json +++ b/examples/region_sharding/main_vschema_sharded.json @@ -14,7 +14,7 @@ "column_vindexes": [ { "columns": ["id", "country"], - "name": "region_vdx" + "name": "region_vdx" } ] } From aa66391ec8ae482b746769d6acce4db1cae0e0ef Mon Sep 17 00:00:00 2001 From: Rohit Kumar <80917122+kmr-rohit@users.noreply.github.com> Date: Mon, 22 Jul 2024 12:09:23 +0530 Subject: [PATCH 2/2] Update .gitignore Signed-off-by: Rohit Kumar <80917122+kmr-rohit@users.noreply.github.com> --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9f5feece695..70ae13ad32d 100644 --- a/.gitignore +++ b/.gitignore @@ -76,7 +76,7 @@ _test/ # Local examples /examples/local/vtdataroot -/examples/region_sharding/vtdataroot + /dist/ /vthook/ /bin/