pyfedi/migrations/versions/b86c49cbd9a0_default_sort.py

32 lines
801 B
Python

"""default sort
Revision ID: b86c49cbd9a0
Revises: 8885aafd5291
Create Date: 2024-01-15 17:37:17.886232
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b86c49cbd9a0'
down_revision = '8885aafd5291'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user', schema=None) as batch_op:
batch_op.add_column(sa.Column('default_sort', sa.String(length=25), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('user', schema=None) as batch_op:
batch_op.drop_column('default_sort')
# ### end Alembic commands ###