🌊 Волна 8: backend качество (4 бага)
- admin_level_counts_n_plus_1: один GROUP BY вместо 6 запросов (admin.py) - duplicate_index_typing_progress: удалён дубль индекса (database.py) - teacher_create_table_on_every_request: DDL в init_db (teacher.py + database.py) - on_event_deprecated: lifespan-контекст (main.py) drop_matview_on_startup + leaderboard_refresh_30s — уже в Волне 1. Аудит: Issue #4, backend 4/20 задач
This commit is contained in:
+3
-2
@@ -215,8 +215,9 @@ async def init_db():
|
||||
)
|
||||
""")
|
||||
|
||||
# ============ Индекс для typing_progress ============
|
||||
await conn.execute("CREATE INDEX IF NOT EXISTS idx_typing_progress_user ON typing_progress(user_id)")
|
||||
# 🔧 ФИКС (23.09.2026): duplicate_index_typing_progress — индекс idx_typing_progress_user
|
||||
# уже создаётся в общем блоке индексов ниже. Убираем дубль здесь.
|
||||
# await conn.execute("CREATE INDEX IF NOT EXISTS idx_typing_progress_user ON typing_progress(user_id)")
|
||||
|
||||
# ============ chat_history ============
|
||||
await conn.execute("""
|
||||
|
||||
Reference in New Issue
Block a user