Add lots of NOT NULL constraints

This commit is contained in:
richard-dds
2018-09-21 13:54:34 -04:00
parent 311fb34ac9
commit de338f675f
9 changed files with 34 additions and 30 deletions

View File

@@ -8,9 +8,9 @@ class RequestInternalComment(Base, mixins.TimestampsMixin):
__tablename__ = "request_internal_comments"
id = types.Id()
text = Column(String())
text = Column(String(), nullable=False)
user_id = Column(ForeignKey("users.id"), nullable=False)
user = relationship("User")
request_id = Column(ForeignKey("requests.id", ondelete="CASCADE"))
request_id = Column(ForeignKey("requests.id", ondelete="CASCADE"), nullable=False)