diff options
| author | Rick Morrison <rickmorrison@gmail.com> | 2006-09-29 20:08:37 +0000 |
|---|---|---|
| committer | Rick Morrison <rickmorrison@gmail.com> | 2006-09-29 20:08:37 +0000 |
| commit | e2e952c2c3e25bfed296d8e73e0015368eac1be2 (patch) | |
| tree | 81e1840bf99e0d2864e02db1bcd33baf414ddd67 /lib | |
| parent | 2ca81bb4c729b042fd8d9605abbb453d5eaa800c (diff) | |
| download | sqlalchemy-e2e952c2c3e25bfed296d8e73e0015368eac1be2.tar.gz | |
fix PK redefinition
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/databases/mssql.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index 0a6dfbe1f..c67b54817 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -465,7 +465,6 @@ class MSSQLDialect(ansisql.ANSIDialect): col_name, type_name = row[3], row[5] if type_name.endswith("identity"): ic = table.c[col_name] - ic.primary_key = True # setup a psuedo-sequence to represent the identity attribute - we interpret this at table.create() time as the identity attribute ic.sequence = schema.Sequence(ic.name + '_identity') @@ -481,7 +480,7 @@ class MSSQLDialect(ansisql.ANSIDialect): c = connection.execute(s) for row in c: if 'PRIMARY' in row[TC.c.constraint_type.name]: - table.c[row[C.c.column_name.name]]._set_primary_key() + table.c[row[0]]._set_primary_key() # Foreign key constraints @@ -496,7 +495,6 @@ class MSSQLDialect(ansisql.ANSIDialect): rows = connection.execute(s).fetchall() # group rows by constraint ID, to handle multi-column FKs - import pdb; pdb.set_trace() fknm, scols, rcols = (None, [], []) for r in rows: scol, rschema, rtbl, rcol, rfknm, fkmatch, fkuprule, fkdelrule = r |
