Skip to content

Commit 67d0b3c

Browse files
authored
Hidden buttons migration fix (#61)
1 parent 086d321 commit 67d0b3c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

migrations/versions/52230bfc3f86_56_add_is_hidden_field.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919

2020
def upgrade():
21-
# ### commands auto generated by Alembic - please adjust! ###
22-
op.add_column('button', sa.Column('is_hidden', sa.Boolean(), nullable=False))
23-
# ### end Alembic commands ###
21+
op.add_column('button', sa.Column('is_hidden', sa.Boolean(), nullable=True))
22+
conn = op.get_bind()
23+
conn.execute(sa.text(f"""UPDATE "button" SET "is_hidden"='false'"""))
24+
op.alter_column('button', 'is_hidden', nullable=False)
2425

2526

2627
def downgrade():

0 commit comments

Comments
 (0)