python - SQLAlchemy Migrate - Can I add (or modify) a column to a certain position of an existing table? -


i want add column position of existing table or move 1 of columns. can't find method in sqlalchemy-migrate.

i want know methods equivalent following mysql queries in sqlalchemy-migrate

alter table tablename add column_name2 int after column_name1 alter table tablename add column_name2 int first alter table tablename modify column column_name2 int after column_name1; 

you need follow below steps:

  1. create temp table,
  2. copy records in temp table
  3. rename temp original table.

during alter operation flow well, these operation executed internally.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -