Ticket #7789: 7789_fields.diff
File 7789_fields.diff, 1.5 KB (added by , 16 years ago) |
---|
-
db/models/fields/__init__.py
515 515 return super(BooleanField, self).formfield(**defaults) 516 516 517 517 class CharField(Field): 518 def __init__(self, *args, **kwargs): 519 super(CharField, self).__init__(*args, **kwargs) 520 if self.unique: 521 self.binary = "BINARY" 522 else: 523 self.binary = "" 524 518 525 def get_manipulator_field_objs(self): 519 526 return [oldforms.TextField] 520 527 -
db/backends/mysql/creation.py
5 5 DATA_TYPES = { 6 6 'AutoField': 'integer AUTO_INCREMENT', 7 7 'BooleanField': 'bool', 8 'CharField': 'varchar(%(max_length)s) ',8 'CharField': 'varchar(%(max_length)s) %(binary)s', 9 9 'CommaSeparatedIntegerField': 'varchar(%(max_length)s)', 10 10 'DateField': 'date', 11 11 'DateTimeField': 'datetime', … … 20 20 'PhoneNumberField': 'varchar(20)', 21 21 'PositiveIntegerField': 'integer UNSIGNED', 22 22 'PositiveSmallIntegerField': 'smallint UNSIGNED', 23 'SlugField': 'varchar(%(max_length)s) ',23 'SlugField': 'varchar(%(max_length)s) BINARY', 24 24 'SmallIntegerField': 'smallint', 25 25 'TextField': 'longtext', 26 26 'TimeField': 'time',