diff options
author | HombreLaser <sebastian-440@live.com> | 2024-02-03 17:25:59 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2024-02-03 17:25:59 -0600 |
commit | b3247ff834b428e7d33745ee8587158d6c05f0a3 (patch) | |
tree | 16caef96c7d623653d119b43249491a5500280d8 /src/database/models/comment.py | |
parent | c24521dda7c9e2de14ef0ff841550fba022b9e0d (diff) |
Add author to comment
Diffstat (limited to 'src/database/models/comment.py')
-rw-r--r-- | src/database/models/comment.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database/models/comment.py b/src/database/models/comment.py index 0110e75..9501bba 100644 --- a/src/database/models/comment.py +++ b/src/database/models/comment.py @@ -9,7 +9,8 @@ class Comment(db.Model): id = mapped_column(BigInteger, primary_key=True) content: Mapped[str] = mapped_column(Text) language: Mapped[str] = mapped_column(String(16), nullable=False) - email: Mapped[str] = mapped_column(String(256)) + email: Mapped[str] = mapped_column(String(256), nullable=True) + author: Mapped[str] = mapped_column(String(128), nullable=True) post: Mapped[str] = mapped_column(String(1024), nullable=False) blog_id: Mapped[int] = mapped_column(ForeignKey('blogs.id'), index=True) blog = relationship('Blog', back_populates='comments') |