feat: add Index on post_tags.post_id and post_tags.tag.id (#675)

pull/677/head
wtune 2020-03-16 14:11:58 +08:00 committed by GitHub
parent 1248cb7b14
commit 2363f4adf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ import java.util.Objects;
*/ */
@Data @Data
@Entity @Entity
@Table(name = "post_tags") @Table(name = "post_tags",
indexes = {@Index(name = "post_tags_post_id", columnList = "post_id"),
@Index(name = "post_tags_tag_id", columnList = "tag_id")})
@ToString(callSuper = true) @ToString(callSuper = true)
public class PostTag extends BaseEntity { public class PostTag extends BaseEntity {