summaryrefslogtreecommitdiff
path: root/alembic
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-05-16 08:55:51 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2023-05-16 13:50:09 -0400
commit513ab5d8029eaeb8cccee8eb931774d13a08d726 (patch)
tree823093e2f9acc729ae5f86ff7924ba2defa3d91b /alembic
parentf983e1d1442070bfc35ce1c19379221c1baf54cf (diff)
downloadalembic-513ab5d8029eaeb8cccee8eb931774d13a08d726.tar.gz
restore drop_index.table_name, drop_constraint.type_ as positional
These two API changes were identified as having legacy use patterns and should be revisited using a deprecation warning for removal in either 1.12 or 1.13. Add documentation re: Alembic not using semver, fix incorrect calling signature example in batch documentation. Change-Id: I33dc5a8d058bcce77591bb037ae964e626a3387f Fixes: #1243 Fixes: #1245
Diffstat (limited to 'alembic')
-rw-r--r--alembic/op.pyi4
-rw-r--r--alembic/operations/base.py6
-rw-r--r--alembic/operations/ops.py9
3 files changed, 9 insertions, 10 deletions
diff --git a/alembic/op.pyi b/alembic/op.pyi
index 10e6f59..931f1bb 100644
--- a/alembic/op.pyi
+++ b/alembic/op.pyi
@@ -933,8 +933,8 @@ def drop_column(
def drop_constraint(
constraint_name: str,
table_name: str,
- *,
type_: Optional[str] = None,
+ *,
schema: Optional[str] = None,
) -> None:
r"""Drop a constraint of the given name, typically via DROP CONSTRAINT.
@@ -952,8 +952,8 @@ def drop_constraint(
def drop_index(
index_name: str,
- *,
table_name: Optional[str] = None,
+ *,
schema: Optional[str] = None,
**kw: Any,
) -> None:
diff --git a/alembic/operations/base.py b/alembic/operations/base.py
index 4e59e5b..853e795 100644
--- a/alembic/operations/base.py
+++ b/alembic/operations/base.py
@@ -1335,8 +1335,8 @@ class Operations(AbstractOperations):
self,
constraint_name: str,
table_name: str,
- *,
type_: Optional[str] = None,
+ *,
schema: Optional[str] = None,
) -> None:
r"""Drop a constraint of the given name, typically via DROP CONSTRAINT.
@@ -1356,8 +1356,8 @@ class Operations(AbstractOperations):
def drop_index(
self,
index_name: str,
- *,
table_name: Optional[str] = None,
+ *,
schema: Optional[str] = None,
**kw: Any,
) -> None:
@@ -1787,7 +1787,7 @@ class BatchOperations(AbstractOperations):
...
def drop_constraint(
- self, constraint_name: str, *, type_: Optional[str] = None
+ self, constraint_name: str, type_: Optional[str] = None
) -> None:
"""Issue a "drop constraint" instruction using the
current batch migration context.
diff --git a/alembic/operations/ops.py b/alembic/operations/ops.py
index 5334a01..3c37fee 100644
--- a/alembic/operations/ops.py
+++ b/alembic/operations/ops.py
@@ -132,8 +132,8 @@ class DropConstraintOp(MigrateOperation):
self,
constraint_name: Optional[sqla_compat._ConstraintNameDefined],
table_name: str,
- *,
type_: Optional[str] = None,
+ *,
schema: Optional[str] = None,
_reverse: Optional[AddConstraintOp] = None,
) -> None:
@@ -196,8 +196,8 @@ class DropConstraintOp(MigrateOperation):
operations: Operations,
constraint_name: str,
table_name: str,
- *,
type_: Optional[str] = None,
+ *,
schema: Optional[str] = None,
) -> None:
r"""Drop a constraint of the given name, typically via DROP CONSTRAINT.
@@ -221,7 +221,6 @@ class DropConstraintOp(MigrateOperation):
cls,
operations: BatchOperations,
constraint_name: str,
- *,
type_: Optional[str] = None,
) -> None:
"""Issue a "drop constraint" instruction using the
@@ -1016,8 +1015,8 @@ class DropIndexOp(MigrateOperation):
def __init__(
self,
index_name: Union[quoted_name, str, conv],
- *,
table_name: Optional[str] = None,
+ *,
schema: Optional[str] = None,
_reverse: Optional[CreateIndexOp] = None,
**kw: Any,
@@ -1065,8 +1064,8 @@ class DropIndexOp(MigrateOperation):
cls,
operations: Operations,
index_name: str,
- *,
table_name: Optional[str] = None,
+ *,
schema: Optional[str] = None,
**kw: Any,
) -> None: