Files
hyungi_document_server/migrations/199_study_question_images_idx.sql
T
Hyungi Ahn 3abccc512d fix(study): 마이그레이션 198 single-statement 분리 — 199_idx 추가
CREATE TABLE + CREATE INDEX 한 파일에 들어가 asyncpg prepared statement
원칙 위반 (cannot insert multiple commands). 198 = TABLE 만, 199 = idx 분리.
첫 시작에서 198 적용 fail 로 init_db 트랜잭션 전체 롤백 → 컨테이너 시작 후
schema_migrations 미반영 + study_question_images 테이블 미생성. 본 fix 후
다음 시작 시 198+199 순차 적용.
2026-04-28 13:44:59 +09:00

6 lines
240 B
SQL

-- 199_study_question_images_idx.sql (2/2)
-- study_question 별 이미지 정렬 조회 (sort_order 오름차순).
CREATE INDEX IF NOT EXISTS idx_study_question_images_qid
ON study_question_images (study_question_id, sort_order, id);