From: CaselIT Date: Tue, 28 Dec 2021 21:15:32 +0000 (+0100) Subject: Remove warning regarding cache key when using MSSQL. X-Git-Tag: rel_1_7_6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=270702253ecb78f7f3e3d920169ab160f8469904;p=thirdparty%2Fsqlalchemy%2Falembic.git Remove warning regarding cache key when using MSSQL. Change-Id: I5eacf7c2030d8dbdaf1e5d2eba836a7596365ae3 --- diff --git a/alembic/ddl/mssql.py b/alembic/ddl/mssql.py index 9e1ef76e..ff756940 100644 --- a/alembic/ddl/mssql.py +++ b/alembic/ddl/mssql.py @@ -255,6 +255,8 @@ class MSSQLImpl(DefaultImpl): class _ExecDropConstraint(Executable, ClauseElement): + inherit_cache = False + def __init__( self, tname: str, @@ -269,6 +271,8 @@ class _ExecDropConstraint(Executable, ClauseElement): class _ExecDropFKConstraint(Executable, ClauseElement): + inherit_cache = False + def __init__( self, tname: str, colname: "Column", schema: Optional[str] ) -> None: diff --git a/docs/build/unreleased/cache_warning.rst b/docs/build/unreleased/cache_warning.rst new file mode 100644 index 00000000..19abad19 --- /dev/null +++ b/docs/build/unreleased/cache_warning.rst @@ -0,0 +1,5 @@ +.. change:: + :tags: mssql + + Removed a warning raised by SQLAlchemy when dropping constraints + on MSSQL regarding statement caching.