Add Request.internal_comments
Using a one to one relationship to avoid the migration hell that we're temporarily stuck in.
This commit is contained in:
16
atst/models/request_internal_comment.py
Normal file
16
atst/models/request_internal_comment.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from sqlalchemy import Column, BigInteger, String, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from atst.models import Base
|
||||
|
||||
|
||||
class RequestInternalComment(Base):
|
||||
__tablename__ = "request_internal_comments"
|
||||
|
||||
id = Column(BigInteger, primary_key=True)
|
||||
text = Column(String())
|
||||
|
||||
user_id = Column(ForeignKey("users.id"), nullable=False)
|
||||
user = relationship("User")
|
||||
|
||||
request_id = Column(ForeignKey("requests.id", ondelete="CASCADE"))
|
Reference in New Issue
Block a user