Add option to disable online status for bots

This commit is contained in:
Tulir Asokan 2020-03-06 15:09:42 +02:00
parent 4aada15bbe
commit 798f5da5de
5 changed files with 58 additions and 3 deletions

View file

@ -0,0 +1,30 @@
"""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 ###