Skip to content

Commit

Permalink
fix bootstrap teardown drop function error #306
Browse files Browse the repository at this point in the history
  • Loading branch information
toluaina committed Jul 6, 2022
1 parent 7c3c871 commit d8e5c2e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pgsync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

__author__ = "Tolu Aina"
__email__ = "toluaina@hotmail.com"
__version__ = "2.3.0"
__version__ = "2.3.1"
4 changes: 3 additions & 1 deletion pgsync/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,9 @@ def create_function(self, schema: str) -> None:
)

def drop_function(self, schema: str) -> None:
self.execute(f'DROP FUNCTION IF EXISTS "{schema}".{TRIGGER_FUNC}()')
self.execute(
f'DROP FUNCTION IF EXISTS "{schema}".{TRIGGER_FUNC}() CASCADE'
)

def disable_triggers(self, schema: str) -> None:
"""Disable all pgsync defined triggers in database."""
Expand Down
3 changes: 1 addition & 2 deletions pgsync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ def teardown(self, drop_view: bool = True) -> None:
)
if drop_view:
self.drop_view(schema)

self.drop_function(schema)
self.drop_function(schema)

self.drop_replication_slot(self.__name)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.3.0
current_version = 2.3.1
commit = True
tag = True

Expand Down

0 comments on commit d8e5c2e

Please sign in to comment.