feat: add index on menus.name (#722)

pull/714/head
wtune 2020-03-27 17:07:25 +08:00 committed by GitHub
parent e16f418167
commit 4f99e72669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ import javax.persistence.*;
*/
@Data
@Entity
@Table(name = "menus", indexes = {@Index(name = "menus_parent_id", columnList = "parent_id")})
@Table(name = "menus",
indexes = {@Index(name = "menus_parent_id", columnList = "parent_id"),
@Index(name = "menus_name", columnList = "name")})
@ToString
@EqualsAndHashCode(callSuper = true)
public class Menu extends BaseEntity {