~ubuntu-branches/ubuntu/jaunty/python-django/jaunty

« back to all changes in this revision

Viewing changes to django/db/backends/mysql_old/creation.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant, Eddy Mulyono
  • Date: 2008-09-16 12:18:47 UTC
  • mfrom: (1.1.5 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080916121847-mg225rg5mnsdqzr0
Tags: 1.0-1ubuntu1
* Merge from Debian (LP: #264191), remaining changes:
  - Run test suite on build.

[Eddy Mulyono]
* Update patch to workaround network test case failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# This dictionary maps Field objects to their associated MySQL column
2
 
# types, as strings. Column-type strings can contain format strings; they'll
3
 
# be interpolated against the values of Field.__dict__ before being output.
4
 
# If a column type is set to None, it won't be included in the output.
5
 
DATA_TYPES = {
6
 
    'AutoField':         'integer AUTO_INCREMENT',
7
 
    'BooleanField':      'bool',
8
 
    'CharField':         'varchar(%(maxlength)s)',
9
 
    'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)',
10
 
    'DateField':         'date',
11
 
    'DateTimeField':     'datetime',
12
 
    'FileField':         'varchar(100)',
13
 
    'FilePathField':     'varchar(100)',
14
 
    'FloatField':        'numeric(%(max_digits)s, %(decimal_places)s)',
15
 
    'ImageField':        'varchar(100)',
16
 
    'IntegerField':      'integer',
17
 
    'IPAddressField':    'char(15)',
18
 
    'ManyToManyField':   None,
19
 
    'NullBooleanField':  'bool',
20
 
    'OneToOneField':     'integer',
21
 
    'PhoneNumberField':  'varchar(20)',
22
 
    'PositiveIntegerField': 'integer UNSIGNED',
23
 
    'PositiveSmallIntegerField': 'smallint UNSIGNED',
24
 
    'SlugField':         'varchar(%(maxlength)s)',
25
 
    'SmallIntegerField': 'smallint',
26
 
    'TextField':         'longtext',
27
 
    'TimeField':         'time',
28
 
    'USStateField':      'varchar(2)',
29
 
}