Skip to content

Commit

Permalink
Apply constraints' schema normalization fix (a5ad49a) to indexes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmafc committed Nov 29, 2011
1 parent f696134 commit a3d8d16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyrseas/dbobject/index.py
Expand Up @@ -6,7 +6,8 @@
This defines two classes, Index and IndexDict, derived This defines two classes, Index and IndexDict, derived
from DbSchemaObject and DbObjectDict, respectively. from DbSchemaObject and DbObjectDict, respectively.
""" """
from pyrseas.dbobject import DbObjectDict, DbSchemaObject, quote_id from pyrseas.dbobject import DbObjectDict, DbSchemaObject
from pyrseas.dbobject import quote_id, split_schema_obj




class Index(DbSchemaObject): class Index(DbSchemaObject):
Expand Down Expand Up @@ -106,6 +107,7 @@ def _from_catalog(self):
for index in self.fetch(): for index in self.fetch():
index.unqualify() index.unqualify()
sch, tbl, idx = index.key() sch, tbl, idx = index.key()
sch, tbl = split_schema_obj('%s.%s' % (sch, tbl))
if index.keycols == '0': if index.keycols == '0':
del index.keycols del index.keycols
self[(sch, tbl, idx)] = index self[(sch, tbl, idx)] = index
Expand Down

0 comments on commit a3d8d16

Please sign in to comment.