feat(sync): full code sync from release
This commit is contained in:
@@ -108,6 +108,8 @@ func (UserSubscription) Indexes() []ent.Index {
|
||||
index.Fields("group_id"),
|
||||
index.Fields("status"),
|
||||
index.Fields("expires_at"),
|
||||
// 活跃订阅查询复合索引(线上由 SQL 迁移创建部分索引,schema 仅用于模型可读性对齐)
|
||||
index.Fields("user_id", "status", "expires_at"),
|
||||
index.Fields("assigned_by"),
|
||||
// 唯一约束通过部分索引实现(WHERE deleted_at IS NULL),支持软删除后重新订阅
|
||||
// 见迁移文件 016_soft_delete_partial_unique_indexes.sql
|
||||
|
||||
Reference in New Issue
Block a user