Difference between revisions of "Sqlalchemy batch dommands"
Jump to navigation
Jump to search
(Created page with "https://www.youtube.com/watch?v=CxCK1DkikgA") |
|||
Line 1: | Line 1: | ||
https://www.youtube.com/watch?v=CxCK1DkikgA | https://www.youtube.com/watch?v=CxCK1DkikgA | ||
+ | |||
+ | https://alembic.sqlalchemy.org/en/latest/batch.html | ||
+ | ``` | ||
+ | with op.batch_alter_table("some_table") as batch_op: | ||
+ | batch_op.add_column(Column('foo', Integer)) | ||
+ | batch_op.drop_column('bar') | ||
+ | ``` |
Latest revision as of 18:40, 8 March 2022
https://www.youtube.com/watch?v=CxCK1DkikgA
https://alembic.sqlalchemy.org/en/latest/batch.html
with op.batch_alter_table("some_table") as batch_op: batch_op.add_column(Column('foo', Integer)) batch_op.drop_column('bar')