if self.length:
return self._extend("VARCHAR(%d)" % self.length)
else:
- return self._extend("TEXT")
+ return self._extend("VARCHAR")
class MSChar(_StringType, sqltypes.CHAR):
@testing.uses_deprecated('Using String type with no length')
def test_type_reflection(self):
# (ask_for, roundtripped_as_if_different)
- specs = [( String(), mysql.MSText(), ),
- ( String(1), mysql.MSString(1), ),
+ specs = [( String(1), mysql.MSString(1), ),
( String(3), mysql.MSString(3), ),
( Text(), mysql.MSText(), ),
- ( Unicode(), mysql.MSText(), ),
( Unicode(1), mysql.MSString(1), ),
( Unicode(3), mysql.MSString(3), ),
( UnicodeText(), mysql.MSText(), ),
class StringTest(TestBase, AssertsExecutionResults):
-
+ @testing.fails_on('mysql')
def test_nolength_string(self):
# this tests what happens with String DDL with no length.
# seems like we need to decide amongst "VARCHAR" (sqlite, postgres), "TEXT" (mysql)