summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/ddl.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/engine/ddl.py')
-rw-r--r--lib/sqlalchemy/engine/ddl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/ddl.py b/lib/sqlalchemy/engine/ddl.py
index 6e7253e9a..f5cff1a20 100644
--- a/lib/sqlalchemy/engine/ddl.py
+++ b/lib/sqlalchemy/engine/ddl.py
@@ -66,7 +66,7 @@ class SchemaGenerator(DDLBase):
if ((not self.dialect.sequences_optional or
not sequence.optional) and
(not self.checkfirst or
- not self.dialect.has_sequence(self.connection, sequence.name))):
+ not self.dialect.has_sequence(self.connection, sequence.name, schema=sequence.schema))):
self.connection.execute(schema.CreateSequence(sequence))
def visit_index(self, index):
@@ -124,5 +124,5 @@ class SchemaDropper(DDLBase):
if ((not self.dialect.sequences_optional or
not sequence.optional) and
(not self.checkfirst or
- self.dialect.has_sequence(self.connection, sequence.name))):
+ self.dialect.has_sequence(self.connection, sequence.name, schema=sequence.schema))):
self.connection.execute(schema.DropSequence(sequence))