Fix: 문서-노트 간 링크 지원을 위한 외래키 제약 조건 제거
- DocumentLink 모델에서 target_document_id 외래키 제약 조건 제거 - 노트 ID도 target_document_id에 저장할 수 있도록 수정 - 데이터베이스에서 fk_document_links_target_document_id_documents 제약 조건 제거
This commit is contained in:
@@ -19,8 +19,8 @@ class DocumentLink(Base):
|
||||
# 링크가 생성된 문서 (출발점)
|
||||
source_document_id = Column(UUID(as_uuid=True), ForeignKey('documents.id'), nullable=False, index=True)
|
||||
|
||||
# 링크 대상 문서 (도착점)
|
||||
target_document_id = Column(UUID(as_uuid=True), ForeignKey('documents.id'), nullable=False, index=True)
|
||||
# 링크 대상 문서 또는 노트 (도착점) - 외래키 제약 조건 제거하여 노트 ID도 허용
|
||||
target_document_id = Column(UUID(as_uuid=True), nullable=False, index=True)
|
||||
|
||||
# 출발점 텍스트 정보 (기존)
|
||||
selected_text = Column(Text, nullable=False) # 선택된 텍스트
|
||||
|
||||
Reference in New Issue
Block a user