- Fixed "default schema" query to work with
pymssql backend.
+- firebird
+ - Fixed bug whereby a column default would fail to
+ reflect if the "default" keyword were lower case.
+
- oracle
- Added ROWID type to the Oracle dialect, for those
cases where an explicit CAST might be needed.
if row['fdefault'] is not None:
# the value comes down as "DEFAULT 'value'": there may be
# more than one whitespace around the "DEFAULT" keyword
+ # and it may also be lower case
# (see also http://tracker.firebirdsql.org/browse/CORE-356)
defexpr = row['fdefault'].lstrip()
- assert defexpr[:8].rstrip() == \
+ assert defexpr[:8].rstrip().upper() == \
'DEFAULT', "Unrecognized default value: %s" % \
defexpr
defvalue = defexpr[8:].strip()
class BuggyDomainReflectionTest(TestBase, AssertsExecutionResults):
- "Test Firebird domains, see [ticket:1663] and http://tracker.firebirdsql.org/browse/CORE-356"
+ """Test Firebird domains (and some other reflection bumps),
+ see [ticket:1663] and http://tracker.firebirdsql.org/browse/CORE-356"""
__only_on__ = 'firebird'
TABLE_A = """\
CREATE TABLE A (
ID DOM_ID /* INTEGER NOT NULL */ DEFAULT 0 )
+"""
+
+ # the 'default' keyword is lower case here
+ TABLE_B = """\
+CREATE TABLE B (
+ID DOM_ID /* INTEGER NOT NULL */ default 0 )
"""
@classmethod
con.execute(cls.DOM_ID)
con.execute(cls.TABLE_A)
+ con.execute(cls.TABLE_B)
@classmethod
def teardown_class(cls):
con = testing.db.connect()
con.execute('DROP TABLE a')
+ con.execute("DROP TABLE b")
con.execute('DROP DOMAIN dom_id')
con.execute('DROP TABLE def_error_nodom')
con.execute('DROP TABLE def_error')
table_a = Table('a', metadata, autoload=True)
eq_(table_a.c.id.server_default.arg.text, "0")
+
+ def test_lowercase_default_name(self):
+ metadata = MetaData(testing.db)
+
+ table_b = Table('b', metadata, autoload=True)
+ eq_(table_b.c.id.server_default.arg.text, "0")
+
class CompileTest(TestBase, AssertsCompiledSQL):