diff --git a/examples/backups/create_commerce_schema.sql b/examples/backups/create_commerce_schema.sql index f24689a068f..dfb785200c8 100644 --- a/examples/backups/create_commerce_schema.sql +++ b/examples/backups/create_commerce_schema.sql @@ -1,6 +1,6 @@ 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; diff --git a/examples/backups/create_customer_schema.sql b/examples/backups/create_customer_schema.sql index 166a56e4c02..f04e6186d8f 100644 --- a/examples/backups/create_customer_schema.sql +++ b/examples/backups/create_customer_schema.sql @@ -1,13 +1,13 @@ create table if not exists customer( customer_id bigint not null, - email varbinary(128), + email varchar(128), primary key(customer_id) ) ENGINE=InnoDB; create table if not exists corder( order_id bigint not null, customer_id bigint, - sku varbinary(128), + sku varchar(128), price bigint, primary key(order_id) ) ENGINE=InnoDB; diff --git a/examples/compose/default_vschema.json b/examples/compose/default_vschema.json index e0b50a66037..0ce3aa0868c 100644 --- a/examples/compose/default_vschema.json +++ b/examples/compose/default_vschema.json @@ -1,8 +1,8 @@ { "sharded": false, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" } } -} +} \ No newline at end of file diff --git a/examples/compose/lookup_keyspace_vschema.json b/examples/compose/lookup_keyspace_vschema.json index f67289821fe..cf0087adc51 100644 --- a/examples/compose/lookup_keyspace_vschema.json +++ b/examples/compose/lookup_keyspace_vschema.json @@ -5,7 +5,7 @@ "column_vindexes": [ { "column": "id", - "name": "hash" + "name": "xxhash" } ] }, @@ -13,14 +13,14 @@ "column_vindexes": [ { "column": "id", - "name": "hash" + "name": "xxhash" } ] } }, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" } } } \ No newline at end of file diff --git a/examples/compose/test_keyspace_vschema.json b/examples/compose/test_keyspace_vschema.json index 55d0df96204..d79a31e854c 100644 --- a/examples/compose/test_keyspace_vschema.json +++ b/examples/compose/test_keyspace_vschema.json @@ -5,7 +5,7 @@ "column_vindexes": [ { "column": "page", - "name": "hash" + "name": "xxhash" }, { "column": "message", @@ -17,7 +17,7 @@ "column_vindexes": [ { "column": "page", - "name": "hash" + "name": "xxhash" }, { "column": "token", @@ -27,8 +27,8 @@ } }, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" }, "messages_message_lookup": { "type": "lookup_hash", diff --git a/examples/compose/vtcompose/base_vschema.json b/examples/compose/vtcompose/base_vschema.json index b867400e5ee..a24905a9411 100644 --- a/examples/compose/vtcompose/base_vschema.json +++ b/examples/compose/vtcompose/base_vschema.json @@ -1,10 +1,9 @@ { "sharded": true, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" } }, - "tables": { - } -} + "tables": {} +} \ No newline at end of file diff --git a/examples/demo/schema/customer/vschema.json b/examples/demo/schema/customer/vschema.json index 9c361475227..4a8a4941612 100644 --- a/examples/demo/schema/customer/vschema.json +++ b/examples/demo/schema/customer/vschema.json @@ -1,8 +1,8 @@ { "sharded": true, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" }, "corder_keyspace_idx": { "type": "consistent_lookup_unique", @@ -31,49 +31,63 @@ }, "tables": { "customer": { - "column_vindexes": [{ - "column": "customer_id", - "name": "hash" - }], + "column_vindexes": [ + { + "column": "customer_id", + "name": "xxhash" + } + ], "auto_increment": { "column": "customer_id", "sequence": "product.customer_seq" } }, "corder": { - "column_vindexes": [{ - "column": "customer_id", - "name": "hash" - }, { - "column": "corder_id", - "name": "corder_keyspace_idx" - }, { - "columns": ["oname", "corder_id"], - "name": "oname_keyspace_idx" - }], + "column_vindexes": [ + { + "column": "customer_id", + "name": "xxhash" + }, + { + "column": "corder_id", + "name": "corder_keyspace_idx" + }, + { + "columns": [ + "oname", + "corder_id" + ], + "name": "oname_keyspace_idx" + } + ], "auto_increment": { "column": "corder_id", "sequence": "product.corder_seq" } }, "corder_event": { - "column_vindexes": [{ - "column": "corder_id", - "name": "corder_keyspace_idx" - }, { - "column": "keyspace_id", - "name": "binary" - }], + "column_vindexes": [ + { + "column": "corder_id", + "name": "corder_keyspace_idx" + }, + { + "column": "keyspace_id", + "name": "binary" + } + ], "auto_increment": { "column": "corder_event_id", "sequence": "product.corder_event_seq" } }, "oname_keyspace_idx": { - "column_vindexes": [{ - "column": "oname", - "name": "unicode_loose_md5" - }] + "column_vindexes": [ + { + "column": "oname", + "name": "unicode_loose_md5" + } + ] } } -} +} \ No newline at end of file diff --git a/examples/local/create_commerce_schema.sql b/examples/local/create_commerce_schema.sql index d8768d88f82..d936d4e82ba 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/local/vschema.json b/examples/local/vschema.json index 17e5dedf0c8..4b922a0f72e 100644 --- a/examples/local/vschema.json +++ b/examples/local/vschema.json @@ -1,8 +1,8 @@ { "sharded": true, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" } }, "tables": { @@ -10,9 +10,9 @@ "column_vindexes": [ { "column": "page", - "name": "hash" + "name": "xxhash" } ] } } -} +} \ No newline at end of file diff --git a/examples/local/vschema_customer_sharded.json b/examples/local/vschema_customer_sharded.json index 3109e2a2f3c..d1c147e1892 100644 --- a/examples/local/vschema_customer_sharded.json +++ b/examples/local/vschema_customer_sharded.json @@ -1,8 +1,8 @@ { "sharded": true, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" } }, "tables": { @@ -10,7 +10,7 @@ "column_vindexes": [ { "column": "customer_id", - "name": "hash" + "name": "xxhash" } ], "auto_increment": { @@ -22,7 +22,7 @@ "column_vindexes": [ { "column": "customer_id", - "name": "hash" + "name": "xxhash" } ], "auto_increment": { @@ -31,4 +31,4 @@ } } } -} +} \ No newline at end of file diff --git a/examples/operator/create_commerce_schema.sql b/examples/operator/create_commerce_schema.sql index d8768d88f82..d936d4e82ba 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/operator/vschema_customer_sharded.json b/examples/operator/vschema_customer_sharded.json index 3109e2a2f3c..d1c147e1892 100644 --- a/examples/operator/vschema_customer_sharded.json +++ b/examples/operator/vschema_customer_sharded.json @@ -1,8 +1,8 @@ { "sharded": true, "vindexes": { - "hash": { - "type": "hash" + "xxhash": { + "type": "xxhash" } }, "tables": { @@ -10,7 +10,7 @@ "column_vindexes": [ { "column": "customer_id", - "name": "hash" + "name": "xxhash" } ], "auto_increment": { @@ -22,7 +22,7 @@ "column_vindexes": [ { "column": "customer_id", - "name": "hash" + "name": "xxhash" } ], "auto_increment": { @@ -31,4 +31,4 @@ } } } -} +} \ No newline at end of file diff --git a/examples/region_sharding/create_main_schema.sql b/examples/region_sharding/create_main_schema.sql index 9ee4f8d9450..ba91d74f45c 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) );