세션 평가와 교수자 분석 보강

This commit is contained in:
Yun Chan 2026-07-01 12:10:52 +09:00
parent 5c4ac04e06
commit fe2796f05a
51 changed files with 4928 additions and 240 deletions

View file

@ -359,8 +359,16 @@ async def _runtime_tables_ready(conn) -> bool:
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'app'
AND table_name = 'turns'
AND column_name = 'provider_events'
) AS has_turn_provider_events,
AND column_name IN (
'audio_ref',
'silence_ms',
'speech_rate',
'barge_in',
'provider_events'
)
GROUP BY table_schema, table_name
HAVING count(*) = 5
) AS has_turn_voice_metadata_columns,
EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_schema = 'app'
@ -485,7 +493,7 @@ async def _runtime_tables_ready(conn) -> bool:
and row["has_engine_config"]
and row["has_session_columns"]
and row["has_state_columns"]
and row["has_turn_provider_events"]
and row["has_turn_voice_metadata_columns"]
and row["has_session_review_worksheet_columns"]
and row["has_stage_defs"]
and row["has_admin_health_event"]
@ -908,6 +916,10 @@ async def ensure_runtime_tables() -> None:
await conn.execute(
"""
ALTER TABLE app.turns
ADD COLUMN IF NOT EXISTS audio_ref TEXT,
ADD COLUMN IF NOT EXISTS silence_ms INT,
ADD COLUMN IF NOT EXISTS speech_rate REAL,
ADD COLUMN IF NOT EXISTS barge_in BOOLEAN,
ADD COLUMN IF NOT EXISTS provider_events JSONB NOT NULL DEFAULT '[]'::jsonb
"""
)