mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-14 02:42:24 +03:00
#12832 declared `idx_cl_request_provider ON call_logs(request_type, provider)` inside SCHEMA_SQL. That block runs before ensureCallLogsColumns() heals a legacy call_logs table, so on any lineage predating the request_type column the CREATE INDEX aborted the whole schema exec with "no such column: request_type" and the server never finished opening the database. Move the index next to the other request_type/combo indexes in ensureCallLogsColumns(), which runs after the ALTER TABLE healing (and is also called on the in-memory path), so both fresh and upgraded databases get it. Proven by tests/unit/db-core-init.test.ts, "legacy call_logs schemas are upgraded before combo target indexes are created" — failing on the release tip, green now.