summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-03-07 15:00:18 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-03-07 15:00:18 -0500
commit9e627159733da48e2fd2d25de93589eb079a75f4 (patch)
treee296fcf7d8744cca8051df672d2586dea22d5ef1 /lib/sqlalchemy/dialects/postgresql/base.py
parent74bec18c2a3cc8e9c031808fc44bc0f2c5af8b43 (diff)
downloadsqlalchemy-9e627159733da48e2fd2d25de93589eb079a75f4.tar.gz
Repair missing "checkfirst" for test suite
the test_metadata tests trigger the before_create dispatch without the checkfirst flag. Postgresql backend should be able to tolerate this. Change-Id: Ife497cc3a4eb2812462116f94aad732864225f3f
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index aaaa64cf1..db52642f8 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1245,24 +1245,24 @@ class ENUM(sqltypes.Enum):
else:
return False
- def _on_table_create(self, target, bind, checkfirst, **kw):
+ def _on_table_create(self, target, bind, checkfirst=False, **kw):
if checkfirst or (
not self.metadata and
not kw.get('_is_metadata_operation', False)) and \
not self._check_for_name_in_memos(checkfirst, kw):
self.create(bind=bind, checkfirst=checkfirst)
- def _on_table_drop(self, target, bind, checkfirst, **kw):
+ def _on_table_drop(self, target, bind, checkfirst=False, **kw):
if not self.metadata and \
not kw.get('_is_metadata_operation', False) and \
not self._check_for_name_in_memos(checkfirst, kw):
self.drop(bind=bind, checkfirst=checkfirst)
- def _on_metadata_create(self, target, bind, checkfirst, **kw):
+ def _on_metadata_create(self, target, bind, checkfirst=False, **kw):
if not self._check_for_name_in_memos(checkfirst, kw):
self.create(bind=bind, checkfirst=checkfirst)
- def _on_metadata_drop(self, target, bind, checkfirst, **kw):
+ def _on_metadata_drop(self, target, bind, checkfirst=False, **kw):
if not self._check_for_name_in_memos(checkfirst, kw):
self.drop(bind=bind, checkfirst=checkfirst)