imports-format+id-fix+remigrate

This commit is contained in:
2022-11-10 08:40:32 +03:00
parent b62211e05f
commit 503d6daa93
11 changed files with 36 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
from datetime import datetime
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, Boolean
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String
from sqlalchemy.orm import relationship
from base.orm import Base
@@ -50,8 +50,7 @@ class ShoutAllowed(Base):
class Shout(Base):
__tablename__ = "shout"
id = None # type: ignore
slug = Column(String, primary_key=True)
slug = Column(String, unique=True)
community = Column(Integer, ForeignKey("community.id"), nullable=False, comment="Community")
lang = Column(String, nullable=False, default='ru', comment="Language")
body = Column(String, nullable=False, comment="Body")