diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-01-20 18:14:02 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-01-20 18:14:02 -0500 |
commit | 417aeaf1453c67130fb8f1a2bb21c38e6795ce25 (patch) | |
tree | 0dd3a43dd183e9619a7f0cc84b8a5623495d84e5 /lib/sqlalchemy/engine/reflection.py | |
parent | 49f1807f8f2acea5494fa77d217dce813a933147 (diff) | |
download | sqlalchemy-417aeaf1453c67130fb8f1a2bb21c38e6795ce25.tar.gz |
- further refine this so that the ordering of columns is maintained as
sent to the primary key constraint; existing tests in the PG dialect
confirm this.
Diffstat (limited to 'lib/sqlalchemy/engine/reflection.py')
-rw-r--r-- | lib/sqlalchemy/engine/reflection.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 9e6cf61dc..45f100518 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -522,16 +522,9 @@ class Inspector(object): # update pk constraint name table.primary_key.name = pk_cons.get('name') - # set the primary key flag on new columns. - # note any existing PK cols on the table also have their - # flag still set. - for col in pk_cols: - col.primary_key = True - # tell the PKConstraint to re-initialize # it's column collection - table.primary_key._reload() - + table.primary_key._reload(pk_cols) fkeys = self.get_foreign_keys(table_name, schema, **table.dialect_kwargs) for fkey_d in fkeys: |