diff options
| author | Derek Anderson <public@kered.org> | 2007-08-06 16:50:17 +0000 |
|---|---|---|
| committer | Derek Anderson <public@kered.org> | 2007-08-06 16:50:17 +0000 |
| commit | 5aa017255827b2c06bd9a5f7f069828ef625da18 (patch) | |
| tree | 22ec9db537e3eeda5c8e21dbfe35f252a97e375d /django/db/backends/sqlite3 | |
| parent | 0af6ed0c4853e11086e277ba352d27db4c466c89 (diff) | |
schema-evolution: update from HEAD (v5821)
git-svn-id: http://code.djangoproject.com/svn/django/branches/schema-evolution@5822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/sqlite3')
| -rw-r--r-- | django/db/backends/sqlite3/creation.py | 6 | ||||
| -rw-r--r-- | django/db/backends/sqlite3/introspection.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py index ab7442252e..eccb19a160 100644 --- a/django/db/backends/sqlite3/creation.py +++ b/django/db/backends/sqlite3/creation.py @@ -4,8 +4,8 @@ DATA_TYPES = { 'AutoField': 'integer', 'BooleanField': 'bool', - 'CharField': 'varchar(%(maxlength)s)', - 'CommaSeparatedIntegerField': 'varchar(%(maxlength)s)', + 'CharField': 'varchar(%(max_length)s)', + 'CommaSeparatedIntegerField': 'varchar(%(max_length)s)', 'DateField': 'date', 'DateTimeField': 'datetime', 'DecimalField': 'decimal', @@ -20,7 +20,7 @@ DATA_TYPES = { 'PhoneNumberField': 'varchar(20)', 'PositiveIntegerField': 'integer unsigned', 'PositiveSmallIntegerField': 'smallint unsigned', - 'SlugField': 'varchar(%(maxlength)s)', + 'SlugField': 'varchar(%(max_length)s)', 'SmallIntegerField': 'smallint', 'TextField': 'text', 'TimeField': 'time', diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py index 8ab8773ddf..824d35dded 100644 --- a/django/db/backends/sqlite3/introspection.py +++ b/django/db/backends/sqlite3/introspection.py @@ -137,7 +137,7 @@ class FlexibleFieldLookupDict: import re m = re.search(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$', key) if m: - return ('CharField', {'maxlength': int(m.group(1))}) + return ('CharField', {'max_length': int(m.group(1))}) raise KeyError DATA_TYPES_REVERSE = FlexibleFieldLookupDict() |
