feat: add Index on comments.post_id (#649)

pull/662/head
wtune 2020-03-14 19:16:33 +08:00 committed by GitHub
parent c1f01df394
commit e357b7a462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ import javax.persistence.*;
*/ */
@Data @Data
@Entity(name = "BaseComment") @Entity(name = "BaseComment")
@Table(name = "comments") @Table(name = "comments", indexes = {@Index(name = "comments_post_id", columnList = "post_id")})
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER, columnDefinition = "int default 0") @DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.INTEGER, columnDefinition = "int default 0")
@ToString(callSuper = true) @ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)