fix: default when adding tab_state.hide_left_bar (#13603)

This commit is contained in:
Beto Dealmeida 2021-03-12 13:37:48 -08:00 committed by GitHub
parent 6e303f3c12
commit 4fc41e1cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,12 +29,18 @@ down_revision = "1412ec1e5a7b"
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
from sqlalchemy.sql import expression
def upgrade():
with op.batch_alter_table("tab_state") as batch_op:
batch_op.add_column(
sa.Column("hide_left_bar", sa.Boolean(), nullable=False, default=False)
sa.Column(
"hide_left_bar",
sa.Boolean(),
nullable=False,
server_default=expression.false(),
)
)