-- 208_attempts_quiz_session.sql (3/4) -- attempts 에 quiz_session_id FK (NULL 허용) — 세션 단위 attempt 묶기. -- 세션 삭제 시 attempt 자체는 보존(SET NULL) — 이력 테이블 RESTRICT 원칙과 동일 의도. ALTER TABLE study_question_attempts ADD COLUMN IF NOT EXISTS quiz_session_id BIGINT REFERENCES study_quiz_sessions(id) ON DELETE SET NULL;