Add index job.sort

pull/312/head
wtune 2020-03-13 17:59:00 +08:00
parent da006624a4
commit 7d348e6a22
2 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,8 @@ import java.sql.Timestamp;
@Entity
@Getter
@Setter
@Table(name="job")
@Table(name="job",
indexs={@Index(name="job_sort", columnList="sort")})
public class Job implements Serializable {
@Id

View File

@ -199,6 +199,7 @@ CREATE TABLE `job` (
`dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
PRIMARY KEY (`id`) USING BTREE,
KEY `job_sort` (`sort`),
INDEX `FKmvhj0rogastlctflsxf1d6k3i`(`dept_id`) USING BTREE,
CONSTRAINT `FKmvhj0rogastlctflsxf1d6k3i` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '岗位' ROW_FORMAT = Compact;