fix(복제): 예정노선 표 원본 차례대로 복사 — SQL 025 가 연도 색인을 지운 뒤 업체 줄 차례가 바뀌어 시험 573_1 실패 · ORDER BY id · year (PLAN 590-4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 13:34:22 +09:00
co-authored by Claude Opus 5.5
parent ff818b21da
commit 8270ae502d
+4 -1
View File
@@ -175,8 +175,11 @@ async def _source_rows(cursor, source_id: str) -> dict[str, list]:
raise LookupError(f"원본 프로젝트가 없음: {source_id}")
rows.update(await _route_children(cursor, [route["id"] for route in rows["routes"]]))
for table in _PLAN_ALL:
order = (
"id" if table == "plan_route_assignees" else "year"
) # 원본 차례 그대로(색인에 안 기댐)
rows[table] = await _rows(
cursor, f"SELECT * FROM {table} WHERE project_id = %s", (source_id,)
cursor, f"SELECT * FROM {table} WHERE project_id = %s ORDER BY {order}", (source_id,)
)
return rows