PCv5/migrations/versions/a7aac1469393_forum_editions.py
Lephe aa75ff09a1
forum: implement forum tree generation
This commit adds a forum tree YAML file (URL-based rather than an
actual tree...) and the 'forums' and 'create-forums' commands for
the master script.

A page /admin/forums is also used to currently display the forum
tree, although this will probably be turned into a full table with
forum descriptions, and a form with edition capabilities.
2019-09-09 08:11:37 +02:00

35 lines
1 KiB
Python

"""forum editions
Revision ID: a7aac1469393
Revises: e3b140752719
Create Date: 2019-09-02 21:12:52.236043
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a7aac1469393'
down_revision = 'e3b140752719'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('forum', sa.Column('descr', sa.UnicodeText(), nullable=True))
op.add_column('forum', sa.Column('prefix', sa.Unicode(length=64), nullable=True))
op.drop_column('forum', 'slug')
op.drop_column('forum', 'description')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('forum', sa.Column('description', sa.TEXT(), autoincrement=False, nullable=True))
op.add_column('forum', sa.Column('slug', sa.VARCHAR(length=64), autoincrement=False, nullable=True))
op.drop_column('forum', 'prefix')
op.drop_column('forum', 'descr')
# ### end Alembic commands ###