Enfyra Server v2.0.6
v2.0.6
Bug Fixes
-
Fixed
KnexHookManagerServiceunique-constraint displacement crashing withNOT NULLviolation on composite uniques (e.g.route_handler_definitionunique["route","method"]). The hook now iterates per-unique instead of per-relation, matches on all FK columns of the composite key, and skips displacement when any FK isNOT NULL— letting the DB enforce the constraint naturally. -
Migrated
jwtAuthMiddlewarefromjsonwebtokentojosefor JWT verification. Token-expired detection now usesERR_JWT_EXPIREDinstead ofTokenExpiredError.
Features
-
Added
DebugTraceutility (src/shared/utils/debug-trace.util.ts) for opt-in per-request performance tracing. Append?debugMode=trueto any dynamic route request to receive adebugobject in the response with middleware timing, query planner output, SQL,EXPLAIN, anddb_executeduration breakdown. -
Added
executeSimplefast path inSqlQueryExecutorfor queries with no joins, no relation filters/sorts, no deep fetches, no table relations, and explicit field selection. Bypasses the full CTE/left-join pipeline for lower latency on simple lookups. -
Added
$debugtoTDynamicContext, propagated throughroute-detect.middlewareandQueryBuilderServiceinto both SQL and Mongo query engines.
Removed
- Removed stale inverse relation
handlersonmethod_definitionviadata-migration.json(leftover from pre-v1.7.8 inverse relation refactor).