From: Mike Bayer Date: Wed, 5 Dec 2007 21:16:02 +0000 (+0000) Subject: some more omit schemas for [ticket:890] X-Git-Tag: rel_0_4_2~107 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=261e76259ae6d7c9b99ce2a858e86ec8115ad81d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git some more omit schemas for [ticket:890] --- diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 1cbfd94d24..749ce4c10f 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -996,7 +996,7 @@ class IdentifierPreparer(object): def format_sequence(self, sequence, use_schema=True): name = self.quote(sequence, sequence.name) - if use_schema and sequence.schema is not None: + if not self.omit_schema and use_schema and sequence.schema is not None: name = self.quote(sequence, sequence.schema) + "." + name return name @@ -1052,7 +1052,7 @@ class IdentifierPreparer(object): # ('database', 'owner', etc.) could override this and return # a longer sequence. - if use_schema and getattr(table, 'schema', None): + if not self.omit_schema and use_schema and getattr(table, 'schema', None): return (self.quote_identifier(table.schema), self.format_table(table, use_schema=False)) else: