summaryrefslogtreecommitdiff
path: root/alembic/operations/batch.py
diff options
context:
space:
mode:
Diffstat (limited to 'alembic/operations/batch.py')
-rw-r--r--alembic/operations/batch.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/alembic/operations/batch.py b/alembic/operations/batch.py
index f4a058b..5b6b547 100644
--- a/alembic/operations/batch.py
+++ b/alembic/operations/batch.py
@@ -243,7 +243,7 @@ class ApplyBatchImpl:
def _grab_table_elements(self) -> None:
schema = self.table.schema
- self.columns: Dict[str, Column] = OrderedDict()
+ self.columns: Dict[str, Column[Any]] = OrderedDict()
for c in self.table.c:
c_copy = _copy(c, schema=schema)
c_copy.unique = c_copy.index = False
@@ -607,7 +607,7 @@ class ApplyBatchImpl:
def add_column(
self,
table_name: str,
- column: Column,
+ column: Column[Any],
insert_before: Optional[str] = None,
insert_after: Optional[str] = None,
**kw,
@@ -621,7 +621,10 @@ class ApplyBatchImpl:
self.column_transfers[column.name] = {}
def drop_column(
- self, table_name: str, column: Union[ColumnClause, Column], **kw
+ self,
+ table_name: str,
+ column: Union[ColumnClause[Any], Column[Any]],
+ **kw,
) -> None:
if column.name in self.table.primary_key.columns:
_remove_column_from_collection(