existing_nullable: Optional[bool] = None,
existing_comment: Optional[str] = None,
schema: Optional[str] = None,
- **kw
+ **kw: Any
) -> Optional[Table]:
"""Issue an "alter column" instruction using the
current migration context.
table_name: str,
condition: Union[str, BinaryExpression],
schema: Optional[str] = None,
- **kw
+ **kw: Any
) -> Optional[Table]:
"""Issue a "create check constraint" instruction using the
current migration context.
match: Optional[str] = None,
source_schema: Optional[str] = None,
referent_schema: Optional[str] = None,
- **dialect_kw
+ **dialect_kw: Any
) -> Optional[Table]:
"""Issue a "create foreign key" instruction using the
current migration context.
columns: Sequence[Union[str, TextClause, Function]],
schema: Optional[str] = None,
unique: bool = False,
- **kw
+ **kw: Any
) -> Optional[Table]:
"""Issue a "create index" instruction using the current
migration context.
"""
-def create_table(table_name: str, *columns, **kw) -> Optional[Table]:
+def create_table(table_name: str, *columns, **kw: Any) -> Optional[Table]:
"""Issue a "create table" instruction using the current migration
context.
table_name: str,
columns: Sequence[str],
schema: Optional[str] = None,
- **kw
+ **kw: Any
) -> Any:
"""Issue a "create unique constraint" instruction using the
current migration context.
"""
def drop_column(
- table_name: str, column_name: str, schema: Optional[str] = None, **kw
+ table_name: str, column_name: str, schema: Optional[str] = None, **kw: Any
) -> Optional[Table]:
"""Issue a "drop column" instruction using the current
migration context.
index_name: str,
table_name: Optional[str] = None,
schema: Optional[str] = None,
- **kw
+ **kw: Any
) -> Optional[Table]:
"""Issue a "drop index" instruction using the current
migration context.
table_name: str,
columns: Sequence[str],
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> None:
self.constraint_name = constraint_name
self.table_name = table_name
table_name: str,
columns: Sequence[str],
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> None:
self.constraint_name = constraint_name
self.table_name = table_name
table_name: str,
columns: Sequence[str],
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> Any:
"""Issue a "create unique constraint" instruction using the
current migration context.
operations: "BatchOperations",
constraint_name: str,
columns: Sequence[str],
- **kw,
+ **kw: Any,
) -> Any:
"""Issue a "create unique constraint" instruction using the
current batch migration context.
referent_table: str,
local_cols: List[str],
remote_cols: List[str],
- **kw,
+ **kw: Any,
) -> None:
self.constraint_name = constraint_name
self.source_table = source_table
match: Optional[str] = None,
source_schema: Optional[str] = None,
referent_schema: Optional[str] = None,
- **dialect_kw,
+ **dialect_kw: Any,
) -> Optional["Table"]:
"""Issue a "create foreign key" instruction using the
current migration context.
deferrable: None = None,
initially: None = None,
match: None = None,
- **dialect_kw,
+ **dialect_kw: Any,
) -> None:
"""Issue a "create foreign key" instruction using the
current batch migration context.
table_name: str,
condition: Union[str, "TextClause", "ColumnElement[Any]"],
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> None:
self.constraint_name = constraint_name
self.table_name = table_name
table_name: str,
condition: Union[str, "BinaryExpression"],
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
"""Issue a "create check constraint" instruction using the
current migration context.
operations: "BatchOperations",
constraint_name: str,
condition: "TextClause",
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
"""Issue a "create check constraint" instruction using the
current batch migration context.
columns: Sequence[Union[str, "TextClause", "ColumnElement[Any]"]],
schema: Optional[str] = None,
unique: bool = False,
- **kw,
+ **kw: Any,
) -> None:
self.index_name = index_name
self.table_name = table_name
columns: Sequence[Union[str, "TextClause", "Function"]],
schema: Optional[str] = None,
unique: bool = False,
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
r"""Issue a "create index" instruction using the current
migration context.
operations: "BatchOperations",
index_name: str,
columns: List[str],
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
"""Issue a "create index" instruction using the
current batch migration context.
table_name: Optional[str] = None,
schema: Optional[str] = None,
_reverse: Optional["CreateIndexOp"] = None,
- **kw,
+ **kw: Any,
) -> None:
self.index_name = index_name
self.table_name = table_name
index_name: str,
table_name: Optional[str] = None,
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
r"""Issue a "drop index" instruction using the current
migration context.
@classmethod
def batch_drop_index(
- cls, operations: BatchOperations, index_name: str, **kw
+ cls, operations: BatchOperations, index_name: str, **kw: Any
) -> Optional["Table"]:
"""Issue a "drop index" instruction using the
current batch migration context.
schema: Optional[str] = None,
_namespace_metadata: Optional["MetaData"] = None,
_constraints_included: bool = False,
- **kw,
+ **kw: Any,
) -> None:
self.table_name = table_name
self.columns = columns
@classmethod
def create_table(
- cls, operations: "Operations", table_name: str, *columns, **kw
+ cls, operations: "Operations", table_name: str, *columns, **kw: Any
) -> Optional["Table"]:
r"""Issue a "create table" instruction using the current migration
context.
modify_server_default: Any = False,
modify_name: Optional[str] = None,
modify_type: Optional[Any] = None,
- **kw,
+ **kw: Any,
) -> None:
super(AlterColumnOp, self).__init__(table_name, schema=schema)
self.column_name = column_name
existing_nullable: Optional[bool] = None,
existing_comment: Optional[str] = None,
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
r"""Issue an "alter column" instruction using the
current migration context.
existing_comment: None = None,
insert_before: None = None,
insert_after: None = None,
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
"""Issue an "alter column" instruction using the current
batch migration context.
table_name: str,
column: "Column",
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> None:
super(AddColumnOp, self).__init__(table_name, schema=schema)
self.column = column
column_name: str,
schema: Optional[str] = None,
_reverse: Optional["AddColumnOp"] = None,
- **kw,
+ **kw: Any,
) -> None:
super(DropColumnOp, self).__init__(table_name, schema=schema)
self.column_name = column_name
table_name: str,
column_name: str,
schema: Optional[str] = None,
- **kw,
+ **kw: Any,
) -> Optional["Table"]:
"""Issue a "drop column" instruction using the current
migration context.
@classmethod
def batch_drop_column(
- cls, operations: "BatchOperations", column_name: str, **kw
+ cls, operations: "BatchOperations", column_name: str, **kw: Any
) -> Optional["Table"]:
"""Issue a "drop column" instruction using the current
batch migration context.
from __future__ import annotations
+from typing import Any
from typing import Callable
from typing import ContextManager
from typing import Dict
"""
def __init__(
- self, config: "Config", script: "ScriptDirectory", **kw
+ self, config: "Config", script: "ScriptDirectory", **kw: Any
) -> None:
r"""Construct a new :class:`.EnvironmentContext`.
self._install_proxy()
return self
- def __exit__(self, *arg, **kw) -> None:
+ def __exit__(self, *arg: Any, **kw: Any) -> None:
self._remove_proxy()
def is_offline_mode(self) -> bool:
sqlalchemy_module_prefix: str = "sa.",
user_module_prefix: Optional[str] = None,
on_version_apply: Optional[Callable] = None,
- **kw,
+ **kw: Any,
) -> None:
"""Configure a :class:`.MigrationContext` within this
:class:`.EnvironmentContext` which will provide database
opts=opts,
)
- def run_migrations(self, **kw) -> None:
+ def run_migrations(self, **kw: Any) -> None:
"""Run migrations as determined by the current command line
configuration
as well as versioning information present (or not) in the current