From fa5443facfe2598d0185c704acae93a880204fe0 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Sat, 29 Mar 2025 22:41:01 +0000 Subject: [PATCH] Add Exception model --- models/exception.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/models/exception.py b/models/exception.py index def5b05..5def12a 100644 --- a/models/exception.py +++ b/models/exception.py @@ -8,11 +8,10 @@ class Exception(Base): __tablename__ = "exceptions" id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4) - error_code = Column(String(50), nullable=False) - error_message = Column(String(255), nullable=False) + error_code = Column(String, nullable=False, index=True) + error_message = Column(Text, nullable=False) stack_trace = Column(Text, nullable=True) - endpoint = Column(String(100), nullable=False) - method = Column(String(10), nullable=False) + endpoint = Column(String, nullable=False) request_data = Column(Text, nullable=True) created_at = Column(DateTime, default=func.now()) updated_at = Column(DateTime, default=func.now(), onupdate=func.now()) \ No newline at end of file