Skip to content

Commit

Permalink
Update 52230bfc3f86_56_add_is_hidden_field.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DaymasS authored Aug 10, 2024
1 parent 7d2b763 commit acf2c92
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions migrations/versions/52230bfc3f86_56_add_is_hidden_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@
def upgrade():
op.add_column('button', sa.Column('is_hidden', sa.Boolean(), nullable=True))
conn = op.get_bind()
res = conn.execute(sa.text("select * from button")).fetchall()
for i in range(0, len(res)):
conn.execute(
sa.text(
f"""UPDATE "button"
SET "is_hidden"='false'
WHERE id={res[i][0]}"""
)
)
conn.execute(sa.text(f"""UPDATE "button" SET "is_hidden"='false'"""))
op.alter_column('button', 'is_hidden', nullable=False)


Expand Down

0 comments on commit acf2c92

Please sign in to comment.