DROP TABLE IF EXISTS `print_info_detail`;
CREATE TABLE `print_info_detail`  (
    `id` int(20) NOT NULL AUTO_INCREMENT COMMENT '打印信息id',
    `order_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单编号',
    `order_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '打印时订单状态',
    `is_append` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '打印状态是否补打',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `delete_flag` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标识;0未删除、1已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

DROP TABLE IF EXISTS rider_station;
CREATE TABLE rider_station
(
    id           INT AUTO_INCREMENT PRIMARY KEY,
    station_name VARCHAR(100)
);

ALTER TABLE `tb_order` ADD COLUMN `is_print` int(32) NULL COMMENT '打印状态  已打印：1 未打印：0' AFTER `order_sequence`;
update tb_order set is_print = 0;

-- 用户表增加站点id字段
ALTER TABLE tb_user ADD rider_station_id int;

-- 给tb_order添加order_number索引
ALTER TABLE tb_order ADD INDEX order_number_index (order_number);
