#
sharding-test.sql
SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS `t_user_01`;
CREATE TABLE `t_user_01`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_02`;
CREATE TABLE `t_user_02`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_03`;
CREATE TABLE `t_user_03`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_04`;
CREATE TABLE `t_user_04`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_05`;
CREATE TABLE `t_user_05`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_06`;
CREATE TABLE `t_user_06`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_07`;
CREATE TABLE `t_user_07`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_08`;
CREATE TABLE `t_user_08`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_09`;
CREATE TABLE `t_user_09`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_10`;
CREATE TABLE `t_user_10`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_11`;
CREATE TABLE `t_user_11`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `t_user_12`;
CREATE TABLE `t_user_12`
(
    `id`       BIGINT(20)                                             NOT NULL,
    `name`     VARCHAR(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `birthday` BIGINT(20)                                             NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

SET
FOREIGN_KEY_CHECKS = 1;


#ORDER
SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;

DROP TABLE IF EXISTS `sys_order_1`;
CREATE TABLE `sys_order_1`
(
    `user_id`  BIGINT(20) NOT NULL,
    `order_id` BIGINT(20) NOT NULL,
    PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;

DROP TABLE IF EXISTS `sys_order_2`;
CREATE TABLE `sys_order_2`
(
    `user_id`  BIGINT(20) NOT NULL,
    `order_id` BIGINT(20) NOT NULL,
    PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8
  COLLATE = utf8_general_ci
  ROW_FORMAT = DYNAMIC;


SET
FOREIGN_KEY_CHECKS = 1;