perf: add GIN indexes on clazz JSONB columns and date-range indexes
- GIN indexes on students/teachers (jsonb_path_ops) for fast user lookups - Composite index on clazz (is_repeat, start_from, end_by) for date range queries - Indexes on clazz_repeat (clazz_id, repeat_start, repeat_end) for joins Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -966,6 +966,7 @@ mod tests {
|
||||
tags: None,
|
||||
current_org_id: current_org_id.map(|value| value.to_string()),
|
||||
current_org_role_keys: Some(vec!["TEACHER".to_string()]),
|
||||
current_department_id: None,
|
||||
};
|
||||
jwt_encode_token(token).expect("encode test token")
|
||||
}
|
||||
|
||||
@@ -337,6 +337,7 @@ mod tests {
|
||||
tags: None,
|
||||
current_org_id: current_org_id.map(|value| value.to_string()),
|
||||
current_org_role_keys: Some(vec!["TEACHER".to_string()]),
|
||||
current_department_id: None,
|
||||
};
|
||||
AuthorizationHeader(jwt_encode_token(token).expect("encode test token"))
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ fn build_test_token(with_org_context: bool) -> String {
|
||||
None
|
||||
},
|
||||
current_org_role_keys: Some(vec!["TEACHER".to_string()]),
|
||||
current_department_id: None,
|
||||
};
|
||||
jwt_encode_token(token).expect("encode test token")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user