maubot/alembic/versions/fccd1f95544d_add_online_field_to_clients.py
2020-03-06 15:09:42 +02:00

30 lines
814 B
Python

"""Add online field to clients
Revision ID: fccd1f95544d
Revises: d295f8dcfa64
Create Date: 2020-03-06 15:07:50.136644
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fccd1f95544d'
down_revision = 'd295f8dcfa64'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("client") as batch_op:
batch_op.add_column(sa.Column('online', sa.Boolean(), nullable=False, server_default=sa.sql.expression.true()))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("client") as batch_op:
batch_op.drop_column('online')
# ### end Alembic commands ###