We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f232ba commit a6c8d8fCopy full SHA for a6c8d8f
1 file changed
migrations/versions/6a486347af93_order.py
@@ -23,11 +23,11 @@ def upgrade():
23
conn = op.get_bind()
24
res = conn.execute(sa.text("select id from button")).fetchall()
25
for i in range(0, len(res)):
26
- conn.execute(sa.text(f"""UPDATE "button"
27
- SET "button".order={i+1},
28
- "button".link='a',
29
- "button".type='b'
30
- WHERE "button".id={res[i]}"""))
+ conn.execute(sa.text(f"""UPDATE "button"
+ SET "order"={i + 1},
+ "link"='#',
+ "type"='external'
+ WHERE id={res[i][0]}"""))
31
op.alter_column('button', 'order', nullable=False)
32
op.alter_column('button', 'link', nullable=False)
33
op.alter_column('button', 'type', nullable=False)
0 commit comments