From 88cb8eb9ceae57ce885ba9a626f250137a170f43 Mon Sep 17 00:00:00 2001 From: knst-kotov Date: Tue, 14 Jun 2022 22:35:28 +0300 Subject: [PATCH] remove shout id --- orm/shout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orm/shout.py b/orm/shout.py index afdc6191..0631c7bc 100644 --- a/orm/shout.py +++ b/orm/shout.py @@ -315,9 +315,9 @@ class CommentStat: class Shout(Base): __tablename__ = 'shout' - # id = None + id = None - slug: str = Column(String, nullable=True, unique=True) + slug: str = Column(String, primary_key=True) community: int = Column(Integer, ForeignKey("community.id"), nullable=False, comment="Community") body: str = Column(String, nullable=False, comment="Body") createdAt: str = Column(DateTime, nullable=False, default = datetime.now, comment="Created at")