no-unique-index
All checks were successful
Deploy to core / deploy (push) Successful in 1m33s

This commit is contained in:
Untone 2024-02-19 17:22:38 +03:00
parent 981a4c4fce
commit 69984788fa
6 changed files with 8 additions and 7 deletions

View File

@ -28,10 +28,11 @@ class AuthorFollower(Base):
class Author(Base):
__tablename__ = 'author'
user = Column(String, unique=True) # unbounded link with authorizer's User type
user = Column(String,
) # unbounded link with authorizer's User type
name = Column(String, nullable=True, comment='Display name')
slug = Column(String, unique=True, comment="Author's slug", index=True)
slug = Column(String, unique=True, comment="Author's slug")
bio = Column(String, nullable=True, comment='Bio') # status description
about = Column(String, nullable=True, comment='About') # long and formatted
pic = Column(String, nullable=True, comment='Picture')

View File

@ -16,7 +16,7 @@ class ShoutCollection(Base):
class Collection(Base):
__tablename__ = 'collection'
slug = Column(String, unique=True, index=True)
slug = Column(String, unique=True)
title = Column(String, nullable=False, comment='Title')
body = Column(String, nullable=True, comment='Body')
pic = Column(String, nullable=True, comment='Picture')

View File

@ -21,7 +21,7 @@ class Community(Base):
__tablename__ = 'community'
name = Column(String, nullable=False)
slug = Column(String, nullable=False, unique=True, index=True)
slug = Column(String, nullable=False, unique=True)
desc = Column(String, nullable=False, default='')
pic = Column(String, nullable=False, default='')
created_at = Column(Integer, nullable=False, default=lambda: int(time.time()))

View File

@ -61,7 +61,7 @@ class Shout(Base):
deleted_by = Column(ForeignKey('author.id'), nullable=True)
body = Column(String, nullable=False, comment='Body')
slug = Column(String, unique=True, index=True)
slug = Column(String, unique=True)
cover = Column(String, nullable=True, comment='Cover image url')
cover_caption = Column(String, nullable=True, comment='Cover image alt caption')
lead = Column(String, nullable=True)

View File

@ -18,7 +18,7 @@ class TopicFollower(Base):
class Topic(Base):
__tablename__ = 'topic'
slug = Column(String, unique=True, index=True)
slug = Column(String, unique=True)
title = Column(String, nullable=False, comment='Title')
body = Column(String, nullable=True, comment='Body')
pic = Column(String, nullable=True, comment='Picture')

View File

@ -73,7 +73,7 @@ typings = {}
mergeTypeStubPackages = false
[tool.pytest.ini_options]
pythonpath = ["tests"]
pythonpath = ["."]
[tool.pytest]
python_files = "*_test.py"