fe26aadb27
asyncpg exec_driver_sql 의 prepared statement 제약상 multi-statement 파일은
"cannot insert multiple commands into a prepared statement" 에러로 적용 실패.
규칙: 한 migration = 한 statement (다중 ADD COLUMN 절은 단일 statement 라 허용,
인덱스/CHECK/CREATE TABLE 은 별도 파일).
이전 cee01af 의 211_md_canonical_layer.sql (6 statements) + 212_document_lineage.sql
(3 statements) 을 9 파일로 분할:
211 ALTER TABLE documents ADD COLUMN x13
212 ADD CONSTRAINT documents_md_draft_status_only_ai
213 idx_documents_md_status_pending
214 idx_documents_content_origin
215 idx_documents_md_frontmatter_gin (선제 인덱스)
216 idx_documents_md_draft_status
217 CREATE TABLE document_lineage
218 idx_document_lineage_source
219 idx_document_lineage_derived
dry-run 재검증: 13 cols / 28 doc idx / 4 lineage idx PASS.
계획 변경 없음 — schema 결과 동일, 적용 단위만 분할.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 lines
194 B
SQL
6 lines
194 B
SQL
-- 214_content_origin_idx.sql
|
|
-- Phase 1A: content_origin 기반 필터 (AI 생성문서 분리 등).
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_documents_content_origin
|
|
ON documents (content_origin);
|