diff --git a/alembic/operations/base.py b/alembic/operations/base.py index c1ae11ab..37222761 100644 --- a/alembic/operations/base.py +++ b/alembic/operations/base.py @@ -1857,7 +1857,10 @@ def create_foreign_key( ... def create_index( - self, index_name: str, columns: list[str], **kw: Any + self, + index_name: str, + columns: Sequence[str | TextClause | ColumnElement[Any]], + **kw: Any, ) -> None: """Issue a "create index" instruction using the current batch migration context. diff --git a/alembic/operations/ops.py b/alembic/operations/ops.py index 9115d3ce..0b5511c6 100644 --- a/alembic/operations/ops.py +++ b/alembic/operations/ops.py @@ -1008,7 +1008,7 @@ def batch_create_index( cls, operations: BatchOperations, index_name: str, - columns: list[str], + columns: Sequence[str | TextClause | ColumnElement[Any]], **kw: Any, ) -> None: """Issue a "create index" instruction using the