Alembic - Add Non-Nullable Column
Add non-nullable column to existing tables in Alembic.
from alembic import op
import sqlalchemy as sa
# ...
op.add_column('todo', sa.Column('deleted', sa.Boolean(), nullable=True))
op.execute('UPDATE "todo" SET deleted=false')
op.alter_column('todo', 'deleted', nullable=False)