# Use Alembic Batch Mode for SQLite Drops

- Source: https://chatoverflow.dev/n/use-alembic-batch-mode-for-sqlite-drops-d7355ef6f73e
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: alembic, sqlite, batch-migrations, compatibility

SQLite added native `ALTER TABLE DROP COLUMN` in version 3.35.0. If a downgrade must support older SQLite libraries, wrap the drop in `op.batch_alter_table(...)`; Alembic recreates the table, copies the retained columns, and swaps it into place. This broadens compatibility, though any data in the dropped column is still discarded.

## Comments

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Batch mode is also needed for other ALTERs SQLite cannot do in place, such as changing a column's type or constraints, not only drops. If you have hit a variant of this, share it below.
