]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Revert optional constraint_name type on drop_constraint, doc fixes.
authorTilman Krummeck <tilman.krummeck@tuev-sued.com>
Mon, 13 Sep 2021 07:49:29 +0000 (09:49 +0200)
committerTilman Krummeck <tilman.krummeck@tuev-sued.com>
Mon, 13 Sep 2021 07:49:29 +0000 (09:49 +0200)
alembic/op.pyi
alembic/operations/ops.py

index 45da0cfa0fa952627333a9b5330b8310bd0a03f8..01078daeaaf6b76ea8bd389358b7bf3c6de982b8 100644 (file)
@@ -541,8 +541,8 @@ def create_foreign_key(
     off normally.   The :class:`~sqlalchemy.schema.AddConstraint`
     construct is ultimately used to generate the ALTER statement.
 
-    :param name: Name of the foreign key constraint.  The name is necessary
-     so that an ALTER statement can be emitted.  For setups that
+    :param constraint_name: Name of the foreign key constraint.  The name is
+     necessary so that an ALTER statement can be emitted.  For setups that
      use an automated naming scheme such as that described at
      :ref:`sqla:constraint_naming_conventions`,
      ``name`` here can be ``None``, as the event listener will
@@ -643,8 +643,8 @@ def create_primary_key(
     off normally.   The :class:`~sqlalchemy.schema.AddConstraint`
     construct is ultimately used to generate the ALTER statement.
 
-    :param name: Name of the primary key constraint.  The name is necessary
-     so that an ALTER statement can be emitted.  For setups that
+    :param constraint_name: Name of the primary key constraint.  The name is
+     necessary so that an ALTER statement can be emitted.  For setups that
      use an automated naming scheme such as that described at
      :ref:`sqla:constraint_naming_conventions`
      ``name`` here can be ``None``, as the event listener will
@@ -850,7 +850,7 @@ def drop_column(
     """
 
 def drop_constraint(
-    constraint_name: Optional[str],
+    constraint_name: str,
     table_name: str,
     type_: Optional[str] = None,
     schema: Optional[str] = None,
@@ -1002,7 +1002,7 @@ def execute(
        op.execute("INSERT INTO table (foo) VALUES ('\:colon_value')")
 
 
-    :param sql: Any legal SQLAlchemy expression, including:
+    :param sqltext: Any legal SQLAlchemy expression, including:
 
     * a string
     * a :func:`sqlalchemy.sql.expression.text` construct.
index d5ddbc94df946649cdc7231c50cfefa6ed4d888a..c4712117ad423947f22088243acccf74e9020437 100644 (file)
@@ -321,9 +321,9 @@ class CreatePrimaryKeyOp(AddConstraintOp):
         off normally.   The :class:`~sqlalchemy.schema.AddConstraint`
         construct is ultimately used to generate the ALTER statement.
 
-        :param name: Name of the primary key constraint.  The name is necessary
-         so that an ALTER statement can be emitted.  For setups that
-         use an automated naming scheme such as that described at
+        :param constraint_name: Name of the primary key constraint.  The name
+         is necessary so that an ALTER statement can be emitted.  For setups
+         that use an automated naming scheme such as that described at
          :ref:`sqla:constraint_naming_conventions`
          ``name`` here can be ``None``, as the event listener will
          apply the name to the constraint object when it is associated
@@ -621,9 +621,9 @@ class CreateForeignKeyOp(AddConstraintOp):
         off normally.   The :class:`~sqlalchemy.schema.AddConstraint`
         construct is ultimately used to generate the ALTER statement.
 
-        :param name: Name of the foreign key constraint.  The name is necessary
-         so that an ALTER statement can be emitted.  For setups that
-         use an automated naming scheme such as that described at
+        :param constraint_name: Name of the foreign key constraint.  The name
+         is necessary so that an ALTER statement can be emitted.  For setups
+         that use an automated naming scheme such as that described at
          :ref:`sqla:constraint_naming_conventions`,
          ``name`` here can be ``None``, as the event listener will
          apply the name to the constraint object when it is associated
@@ -2389,7 +2389,7 @@ class ExecuteSQLOp(MigrateOperation):
            op.execute("INSERT INTO table (foo) VALUES ('\:colon_value')")
 
 
-        :param sql: Any legal SQLAlchemy expression, including:
+        :param sqltext: Any legal SQLAlchemy expression, including:
 
         * a string
         * a :func:`sqlalchemy.sql.expression.text` construct.