SET FOREIGN_KEY_CHECKS=0;

ALTER TABLE `bankcard` ADD COLUMN `PreValidState` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '销户前是否有效状态' AFTER `ClientDepartId`;

CREATE TABLE `client_tag`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键Id',
  `ClientId` int NOT NULL COMMENT '客户Id',
  `TagId` int NOT NULL COMMENT '标签Id',
  `OptId` int NULL DEFAULT NULL COMMENT '操作人',
  `OptName` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人名称',
  `OptDate` datetime NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `querybyclientid`(`ClientId` ASC) USING BTREE,
  INDEX `querybytagid`(`TagId` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '客户 标签 关联表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS=1;