|
@@ -179,7 +179,7 @@ CREATE TABLE `t_affair_sheet_column` (
|
|
|
`column_order` int(11) NULL DEFAULT 0,
|
|
|
PRIMARY KEY (`sheet_column_id`) USING BTREE,
|
|
|
INDEX `sheet_id`(`sheet_id`) USING BTREE,
|
|
|
- INDEX `system_column_id`(`column_id`) USING BTREE,
|
|
|
+ INDEX `column_id`(`column_id`) USING BTREE,
|
|
|
CONSTRAINT `t_affair_sheet_column_ibfk_1` FOREIGN KEY (`sheet_id`) REFERENCES `t_affair_sheet` (`sheet_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
CONSTRAINT `t_affair_sheet_column_ibfk_2` FOREIGN KEY (`column_id`) REFERENCES `t_affair_system_column` (`column_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
|
|
@@ -457,7 +457,7 @@ CREATE TABLE `t_company` (
|
|
|
`version` int(11) NULL DEFAULT NULL,
|
|
|
`company_phone` varchar(255) NULL,
|
|
|
PRIMARY KEY (`company_id`) USING BTREE,
|
|
|
- INDEX `FK_Reference_29`(`location_id`) USING BTREE,
|
|
|
+ INDEX `location_id`(`location_id`) USING BTREE,
|
|
|
INDEX `customerGroupId`(`customerGroupId`) USING BTREE,
|
|
|
INDEX `company_name`(`company_name`) USING BTREE,
|
|
|
INDEX `company_shortname`(`company_shortname`) USING BTREE,
|
|
@@ -499,7 +499,7 @@ CREATE TABLE `t_customer` (
|
|
|
`customer_phone3` varchar(255) NULL DEFAULT '',
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
INDEX `companyId`(`companyId`) USING BTREE,
|
|
|
- INDEX `t_customer_ibfk_2`(`customerCompanyId`) USING BTREE,
|
|
|
+ INDEX `customerCompanyId`(`customerCompanyId`) USING BTREE,
|
|
|
INDEX `id`(`id`, `customerCompanyId`) USING BTREE,
|
|
|
INDEX `groupId`(`groupId`) USING BTREE,
|
|
|
CONSTRAINT `t_customer_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `t_company` (`company_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
@@ -561,7 +561,7 @@ CREATE TABLE `t_documentary` (
|
|
|
`utime` datetime(0) NULL DEFAULT NULL,
|
|
|
`status` tinyint(2) NULL DEFAULT 99,
|
|
|
PRIMARY KEY (`documentary_id`) USING BTREE,
|
|
|
- UNIQUE INDEX `documentary_number` (`documentary_number_pid`, `documentary_number`) USING BTREE
|
|
|
+ UNIQUE INDEX `documentary_number_pid` (`documentary_number_pid`, `documentary_number`) USING BTREE
|
|
|
) ENGINE = InnoDB ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
@@ -733,7 +733,7 @@ CREATE TABLE `t_location` (
|
|
|
`location_level` tinyint(1) NULL DEFAULT NULL,
|
|
|
`location_phonenum` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
|
|
|
PRIMARY KEY (`location_id`) USING BTREE,
|
|
|
- INDEX `FK_Reference_28`(`location_pid`) USING BTREE,
|
|
|
+ INDEX `location_pid`(`location_pid`) USING BTREE,
|
|
|
CONSTRAINT `FK_Reference_28` FOREIGN KEY (`location_pid`) REFERENCES `t_location` (`location_id`) ON DELETE SET NULL ON UPDATE CASCADE
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
|
|
|
|
|
@@ -992,7 +992,7 @@ CREATE TABLE `t_product` (
|
|
|
`product_partially` text CHARACTER SET utf8 NULL,
|
|
|
PRIMARY KEY (`product_id`) USING BTREE,
|
|
|
UNIQUE INDEX `product_id`(`product_id`) USING BTREE,
|
|
|
- INDEX `FK_Relationship_12`(`user_id`) USING BTREE,
|
|
|
+ INDEX `user_id`(`user_id`) USING BTREE,
|
|
|
INDEX `ctime`(`ctime`) USING BTREE,
|
|
|
INDEX `status`(`status`) USING BTREE,
|
|
|
INDEX `company_id`(`company_id`) USING BTREE,
|
|
@@ -1044,7 +1044,7 @@ CREATE TABLE `t_r_product_collection` (
|
|
|
`product_id` int(11) NOT NULL,
|
|
|
PRIMARY KEY (`collection_id`, `product_id`) USING BTREE,
|
|
|
INDEX `product_id`(`product_id`) USING BTREE,
|
|
|
- INDEX `collection_id_2`(`collection_id`) USING BTREE,
|
|
|
+ INDEX `collection_id`(`collection_id`) USING BTREE,
|
|
|
CONSTRAINT `t_r_product_collection_ibfk_1` FOREIGN KEY (`collection_id`) REFERENCES `t_collection` (`collection_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
|
CONSTRAINT `t_r_product_collection_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `t_product` (`product_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
|
) ENGINE = InnoDB ROW_FORMAT = Dynamic;
|
|
@@ -1318,10 +1318,10 @@ CREATE TABLE `t_statement_calculation` (
|
|
|
`calculation_ctime` datetime(0) NULL DEFAULT NULL,
|
|
|
`calculation_note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
|
|
PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
|
|
|
- INDEX (`bill_order_number`) USING BTREE,
|
|
|
+ INDEX `bill_order_number`(`bill_order_number`) USING BTREE,
|
|
|
INDEX `bill_order_id`(`bill_order_id`) USING BTREE,
|
|
|
INDEX `call_time`(`call_time`) USING BTREE,
|
|
|
- INDEX ` calculation_value`(`calculation_key`, `affair_id`, `calculation_time`, `calculation_value`, `calculation_condition`, `tagIds`) USING BTREE,
|
|
|
+ INDEX `calculation_value`(`calculation_key`, `affair_id`, `calculation_time`, `calculation_value`, `calculation_condition`, `tagIds`) USING BTREE,
|
|
|
INDEX `calculation_time`(`calculation_time`, `affair_id`, `calculation_condition`, `tagIds`) USING BTREE
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
|
|
|
|
|
@@ -1365,7 +1365,7 @@ CREATE TABLE `t_tag_list` (
|
|
|
`permission_view` INT ( 1 ) NULL DEFAULT 1,
|
|
|
`tag_group_id` int(11) NULL DEFAULT 0,
|
|
|
PRIMARY KEY (`tag_id`) USING BTREE,
|
|
|
- INDEX `t_tag_list_ibfk_1`(`tag_image_id`) USING BTREE
|
|
|
+ INDEX `tag_image_id`(`tag_image_id`) USING BTREE
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
@@ -1456,7 +1456,7 @@ CREATE TABLE `t_user` (
|
|
|
`report_password` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NULL,
|
|
|
`report_password_type` tinyint(1) NULL DEFAULT 0,
|
|
|
PRIMARY KEY (`user_id`) USING BTREE,
|
|
|
- INDEX `FK_Relationship_2`(`role_id`) USING BTREE,
|
|
|
+ INDEX `role_id`(`role_id`) USING BTREE,
|
|
|
INDEX `company_id`(`company_id`) USING BTREE,
|
|
|
INDEX `department_id`(`department_id`) USING BTREE,
|
|
|
INDEX `user_name`(`user_name`) USING BTREE,
|
|
@@ -1654,7 +1654,7 @@ CREATE TABLE `t_machine_calculation` (
|
|
|
`machine_production_state` tinyint(1) NULL DEFAULT 0,
|
|
|
PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
|
|
|
INDEX `call_time`(`call_time`) USING BTREE,
|
|
|
- INDEX ` calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `product_id`, `tagIds`, `calculation_time2`) USING BTREE
|
|
|
+ INDEX `calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `product_id`, `tagIds`, `calculation_time2`) USING BTREE
|
|
|
) ENGINE = InnoDB ROW_FORMAT = Dynamic;
|
|
|
-- ----------------------------
|
|
|
-- Table structure for t_ticket_calculation
|
|
@@ -1676,7 +1676,7 @@ CREATE TABLE `t_ticket_calculation` (
|
|
|
`ticket_time` datetime(0) NOT NULL ,
|
|
|
PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,
|
|
|
INDEX `call_time`(`call_time`) USING BTREE,
|
|
|
- INDEX ` calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `tagIds`, `ticket_key`, `ticket_time`) USING BTREE
|
|
|
+ INDEX `calculation_value`(`affair_id`, `calculation_key`, `calculation_condition`, `calculation_time`, `tagIds`, `ticket_key`, `ticket_time`) USING BTREE
|
|
|
) ENGINE = InnoDB ROW_FORMAT = Dynamic;
|
|
|
-- ----------------------------
|
|
|
-- Table structure for t_customer_given
|