feat: add Index on post_categories.post_id and post_categories.category_id (#671)

pull/676/head
wtune 2020-03-16 13:22:24 +08:00 committed by GitHub
parent 839a029012
commit 1248cb7b14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,9 @@ import java.util.Objects;
* @author johnniang
*/
@Entity
@Table(name = "post_categories")
@Table(name = "post_categories",
indexes = {@Index(name = "post_categories_post_id", columnList = "post_id"),
@Index(name = "post_categories_category_id", columnList = "category_id")})
@Data
@ToString(callSuper = true)
public class PostCategory extends BaseEntity {