sqlalchemy / alembic

A database migrations tool for SQLAlchemy.
MIT License
2.61k stars 234 forks source link

alembic is passing an empty tuple to conn.execute() which is nonsensical #1394

Closed zzzeek closed 6 months ago

zzzeek commented 6 months ago

this should be fixed because in https://github.com/sqlalchemy/sqlalchemy/issues/9647 we are going to disallow or warn for this

CaselIT commented 6 months ago

this is here https://github.com/sqlalchemy/alembic/blob/abc8002ec67ddcb0a0be56b8167a4837f3884217/alembic/ddl/impl.py#L172

CaselIT commented 6 months ago

was added here https://github.com/sqlalchemy/alembic/commit/53b9cccf73a7655191186fcc9b721f7a448255c0 so it's effectively "since forever"

sqla-tester commented 6 months ago

Mike Bayer has proposed a fix for this issue in the main branch:

dont pass empty sequences to connection.execute() https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5122