mirror of https://github.com/halo-dev/halo
feat: add Index on posts.(type,status) and posts.create_time (#684)
parent
4bc8ad44da
commit
9ccd23d730
|
@ -19,7 +19,9 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Entity(name = "BasePost")
|
@Entity(name = "BasePost")
|
||||||
@Table(name = "posts")
|
@Table(name = "posts",
|
||||||
|
indexes = {@Index(name = "posts_type_status", columnList = "type, status"),
|
||||||
|
@Index(name = "posts_create_time", columnList = "create_time")})
|
||||||
@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)
|
||||||
|
|
Loading…
Reference in New Issue