mirror of https://github.com/elunez/eladmin
Add Index on dept.pid
parent
da006624a4
commit
e27a03d6c6
|
@ -19,7 +19,7 @@ import java.util.Set;
|
||||||
@Entity
|
@Entity
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Table(name="dept")
|
@Table(name="dept", indexes = {@Index(name = "dept_pid", columnList = "pid")})
|
||||||
public class Dept implements Serializable {
|
public class Dept implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
|
|
@ -80,7 +80,8 @@ CREATE TABLE `dept` (
|
||||||
`pid` bigint(20) NOT NULL COMMENT '上级部门',
|
`pid` bigint(20) NOT NULL COMMENT '上级部门',
|
||||||
`enabled` bit(1) NOT NULL COMMENT '状态',
|
`enabled` bit(1) NOT NULL COMMENT '状态',
|
||||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `dept_pid` (`pid`)
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门' ROW_FORMAT = Compact;
|
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门' ROW_FORMAT = Compact;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
Loading…
Reference in New Issue