]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Minor cleanup
authorFederico Caselli <cfederico87@gmail.com>
Wed, 13 Jul 2022 21:18:57 +0000 (23:18 +0200)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 13 Jul 2022 21:18:57 +0000 (23:18 +0200)
- remove unnecessary postgresql visit that's equal to the default compiler
- clarify type_annotation_map documentation

Change-Id: I0c1fa212d06f6af799a5894802574250622c855e

lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/orm/decl_api.py

index 56bc02b2369295838d079dd87ee9f72068a35504..20903b55f9ea473d173811dccd71b28aa6c34267 100644 (file)
@@ -2188,11 +2188,6 @@ class PGDDLCompiler(compiler.DDLCompiler):
         text += self._define_constraint_validity(constraint)
         return text
 
-    def visit_drop_table_comment(self, drop):
-        return "COMMENT ON TABLE %s IS NULL" % self.preparer.format_table(
-            drop.element
-        )
-
     def visit_create_enum_type(self, create):
         type_ = create.element
 
index 9c095c7401a7f7bbdd1a05d3eaa00d66619947ff..e6e69a9e07b97c19852bde27548b4e25f9745a92 100644 (file)
@@ -910,7 +910,8 @@ class registry:
           inter-base relationships.
 
         :param type_annotation_map: optional dictionary of Python types to
-          SQLAlchemy :class:`_types.TypeEngine` classes or instances.  This
+          SQLAlchemy :class:`_types.TypeEngine` classes or instances.
+          The provided dict will update the default type mapping.  This
           is used exclusively by the :class:`_orm.MappedColumn` construct
           to produce column types based on annotations within the
           :class:`_orm.Mapped` type.