diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-12-14 13:58:58 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-12-14 13:58:58 -0500 |
commit | 31dd4824d33572b708abd331b3271a298d14966c (patch) | |
tree | 505e0a10a5d5778c31ab3035c98a18a680d0398b /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 04937652f426e518781b2b762b0e0e8090857cbd (diff) | |
download | sqlalchemy-31dd4824d33572b708abd331b3271a298d14966c.tar.gz |
Fully copy index expressions
Fixed bug where the :meth:`.Table.tometadata` method would not properly
accommodate :class:`.Index` objects that didn't consist of simple
column expressions, such as indexes against a :func:`.text` construct,
indexes that used SQL expressions or :attr:`.func`, etc. The routine
now copies expressions fully to a new :class:`.Index` object while
substituting all table-bound :class:`.Column` objects for those
of the target table.
Also refined the means by which tometadata() checks if an Index
or UniqueConstraint is generated by a column-level flag, by propagating
an attribute "_column_flag=True" to such indexes/constraints.
Change-Id: I7ef1b8ea42f9933357ae35f241a5ba9838bac35b
Fixes: #4147
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
0 files changed, 0 insertions, 0 deletions