Can I Add or Modify a Column in an Existing Table with SQLAlchemy?

The answer is not easily. If you want to modify/add a column in a single, table, the best thing to do is modify your table within the database. For example, click here to see how to add a column in SQLite: https://stackoverflow.com/questions/4253804/insert-new-column-into-table-in-sqlite

The other way is to get into SQLAlchemy migration and not practical for small-scale table modifications: https://sqlalchemy-migrate.readthedocs.io/en/latest/index.html

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store