From af964412d95fe174d4bd8c61fdef55a70c5118ee Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Thu, 3 Sep 2026 04:17:47 +0530 Subject: [PATCH] test(web): drop idx_sessions_effective_activity before emulating a pre-column store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The salvaged #95487 adds an expression index over sessions.last_activity_at. Two web_server tests emulate a legacy store with ALTER TABLE ... DROP COLUMN last_activity_at, which SQLite refuses while an index references the column ('error in index ... after drop column'). Drop the index first — the same adjustment the PR already made in test_schema_read_probe.py. A real pre-column store has neither the column nor the index, so the healed path under test is unchanged. --- tests/hermes_cli/test_web_server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/hermes_cli/test_web_server.py b/tests/hermes_cli/test_web_server.py index 9f7a6d810a..025a6cc153 100644 --- a/tests/hermes_cli/test_web_server.py +++ b/tests/hermes_cli/test_web_server.py @@ -440,6 +440,9 @@ class TestWebServerEndpoints: legacy = sqlite3.connect(str(db_path)) try: + # SQLite refuses DROP COLUMN while an index references the + # column; a pre-column legacy store has neither. + legacy.execute("DROP INDEX IF EXISTS idx_sessions_effective_activity") legacy.execute(f"ALTER TABLE sessions DROP COLUMN {missing_column}") legacy.commit() finally: @@ -486,6 +489,7 @@ class TestWebServerEndpoints: legacy = sqlite3.connect(str(db_path)) try: + legacy.execute("DROP INDEX IF EXISTS idx_sessions_effective_activity") legacy.execute("ALTER TABLE sessions DROP COLUMN last_activity_at") legacy.commit() finally: