Add unique constraint for session id
This commit is contained in:
@@ -7,7 +7,7 @@ class CallEvent(Base):
|
||||
__tablename__ = "call_events"
|
||||
|
||||
id = Column(PG_UUID(as_uuid=True), primary_key=True, default=uuid.uuid4, index=True)
|
||||
call_session_id = Column(BigInteger, nullable=False, index=True)
|
||||
call_session_id = Column(BigInteger, nullable=False, unique=True, index=True)
|
||||
direction = Column(String, nullable=False)
|
||||
notification_mnemonic = Column(String, nullable=False)
|
||||
last_answered_employee_full_name = Column(String, nullable=True)
|
||||
|
||||
Reference in New Issue
Block a user