maubot/alembic/versions/4b93300852aa_add_device_id_to_clients.py

33 lines
812 B
Python
Raw Normal View History

2020-07-11 13:22:27 +00:00
"""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 ###