mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
35 lines
971 B
Python
35 lines
971 B
Python
|
"""alt user names
|
||
|
|
||
|
Revision ID: 2cae414cbc7a
|
||
|
Revises: f1f38dabd541
|
||
|
Create Date: 2024-08-19 19:38:36.616993
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '2cae414cbc7a'
|
||
|
down_revision = 'f1f38dabd541'
|
||
|
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('alt_user_name', sa.String(length=255), nullable=True))
|
||
|
batch_op.create_index(batch_op.f('ix_user_alt_user_name'), ['alt_user_name'], unique=False)
|
||
|
|
||
|
# ### 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_index(batch_op.f('ix_user_alt_user_name'))
|
||
|
batch_op.drop_column('alt_user_name')
|
||
|
|
||
|
# ### end Alembic commands ###
|