maubot/alembic/versions/4b93300852aa_add_device_id_to_clients.py
2020-07-11 16:22:27 +03:00

33 lines
812 B
Python

"""Add device_id to clients
Revision ID: 4b93300852aa
Revises: fccd1f95544d
Create Date: 2020-07-11 15:49:38.831459
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4b93300852aa'
down_revision = 'fccd1f95544d'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('client', schema=None) as batch_op:
batch_op.add_column(sa.Column('device_id', sa.String(length=255), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('client', schema=None) as batch_op:
batch_op.drop_column('device_id')
# ### end Alembic commands ###