added topic listing

This commit is contained in:
2022-05-01 09:51:03 +02:00
parent 3b7b3b4483
commit 0a307fc953
27 changed files with 386 additions and 175 deletions

View File

@@ -0,0 +1,32 @@
"""init
Revision ID: de7d23a4b139
Revises: 85284752d1d5
Create Date: 2022-05-01 08:41:03.244262
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'de7d23a4b139'
down_revision = '85284752d1d5'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('tags', sa.Column('tag_name', sa.Unicode(length=25), nullable=False))
op.create_unique_constraint(op.f('uq_tags_tag_name'), 'tags', ['tag_name'])
op.add_column('topics', sa.Column('topic_name', sa.Unicode(length=25), nullable=False))
op.create_unique_constraint(op.f('uq_topics_topic_name'), 'topics', ['topic_name'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(op.f('uq_topics_topic_name'), 'topics', type_='unique')
op.drop_column('topics', 'topic_name')
op.drop_constraint(op.f('uq_tags_tag_name'), 'tags', type_='unique')
op.drop_column('tags', 'tag_name')
# ### end Alembic commands ###