]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
cast() types in batch only if type_affinity is different
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 23 Nov 2016 19:42:19 +0000 (14:42 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 23 Nov 2016 19:43:07 +0000 (14:43 -0500)
commit3926ac6b000ed7f3dbdb5376a54f39351b3b4e35
treeb42b8f956b2ded7634a9b40ce00fd74f39c63b71
parente197537229a0f25e764f9f7dbd469635906004fb
cast() types in batch only if type_affinity is different

Batch mode will not use CAST() to copy data if type_ is given, however
the basic type affinity matches that of the existing type.  This to
avoid SQLite's CAST of TIMESTAMP which results in truncation of the
data, in those cases where the user needs to add redundant type_ for
other reasons.

Change-Id: I20f7b399cd3cd7740d67ff7d624aa1da874ebc71
Fixes: #391
alembic/operations/batch.py
docs/build/changelog.rst
tests/test_batch.py