Skip to content

Commit

Permalink
Fix DROP CONSTRAINT and COMMENT ON CONSTRAINT tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmafc committed Aug 21, 2015
1 parent 5f688ac commit 83b4694
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pyrseas/dbobject/index.py
Expand Up @@ -157,6 +157,17 @@ def alter(self, inindex):
stmts.append(super(Index, self).alter(inindex))
return stmts

def drop(self):
"""Generate SQL to drop the current index
:return: list of SQL statements
"""
# indexes defined by constraints are not to be dealt with as indexes
if getattr (self, '_for_constraint', None):
return []

return ["DROP INDEX %s" % self.identifier()]

def get_implied_deps(self, db):
deps = super(Index, self).get_implied_deps(db)

Expand Down

0 comments on commit 83b4694

Please sign in to comment.