]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Unwrap TIMESTAMP when doing an isinstance()
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Jun 2019 17:25:12 +0000 (13:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Jun 2019 21:51:28 +0000 (17:51 -0400)
commit22131f06294698781dca4b279bfeaed818bf1e43
treeeffa03d404b892f50c873680772a9d3468488d12
parenteaba0a9d937e4931a42976ba805891844f8ff880
Unwrap TIMESTAMP when doing an isinstance()

Fixed bug where the special logic to render "NULL" for the
:class:`.TIMESTAMP` datatype when ``nullable=True`` would not work if the
column's datatype were a :class:`.TypeDecorator` or a :class:`.Variant`.
The logic now ensures that it unwraps down to the original
:class:`.TIMESTAMP` so that this special case NULL keyword is correctly
rendered when requested.

Fixes: #4743
Change-Id: I02b22dfa3db06daea37b044e2206a8569e2e5d22
(cherry picked from commit 401a2691fbeebd5a26341e732644584cb096bc58)
doc/build/changelog/unreleased_13/4743.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_types.py