feat: add user_id index to profiles table for faster lookups

The profiles table previously lacked an index on the user_id column, causing full table scans during user lookups. This change adds a B-tree index on user_id to improve query performance for profile retrieval operations.
This commit is contained in:
2026-06-14 14:46:36 +00:00
parent 4fc4154dcc
commit f424d02523
149 changed files with 9811 additions and 262 deletions
View File
+23
View File
@@ -0,0 +1,23 @@
# retoor <retoor@molodetz.nl>
from tests.conftest import BASE_URL
def test_admin_bots_page_loads(alice):
page, _ = alice
page.goto(f"{BASE_URL}/admin/bots", wait_until="domcontentloaded")
assert page.is_visible("text=Bot Monitor")
assert page.locator("#bots-grid").count() == 1
def test_admin_bots_sidebar_link(alice):
page, _ = alice
page.goto(f"{BASE_URL}/admin/services", wait_until="domcontentloaded")
link = page.locator("a.sidebar-link[href='/admin/bots']")
link.wait_for(state="visible")
assert link.count() == 1
def test_admin_bots_redirect_unauth(page, app_server):
page.goto(f"{BASE_URL}/admin/bots", wait_until="domcontentloaded")
assert page.url.startswith(f"{BASE_URL}/auth/login")