feat: add index on attachments.create_time (#725)

pull/731/head
wtune 2020-03-28 00:16:12 +08:00 committed by GitHub
parent 51e0620393
commit f21f5933bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,9 @@ import javax.persistence.*;
*/ */
@Data @Data
@Entity @Entity
@Table(name = "attachments", indexes = {@Index(name = "attachments_media_type", columnList = "media_type")}) @Table(name = "attachments",
indexes = {@Index(name = "attachments_media_type", columnList = "media_type"),
@Index(name = "attachments_create_time", columnList = "create_time")})
@ToString @ToString
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class Attachment extends BaseEntity { public class Attachment extends BaseEntity {