diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-12-09 03:32:45 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-12-09 03:32:45 +0000 |
| commit | 06a2dc42b2aad23550e378b6a4dd65bd930133a3 (patch) | |
| tree | 658d335335873e1c839ac4755e67fe2501f1d43b /django/core/db/backends/postgresql.py | |
| parent | 7d0bcc57275c6e80cc9bdac8cf0e8c8c00e58659 (diff) | |
Fixed #1032 -- CREATE TABLE SQL in Postgres now quotes column name in 'CHECK' clause. Thanks, exoweb adrian
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/db/backends/postgresql.py')
| -rw-r--r-- | django/core/db/backends/postgresql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/db/backends/postgresql.py b/django/core/db/backends/postgresql.py index c650660ad8..a4ce5b39ee 100644 --- a/django/core/db/backends/postgresql.py +++ b/django/core/db/backends/postgresql.py @@ -174,8 +174,8 @@ DATA_TYPES = { 'NullBooleanField': 'boolean', 'OneToOneField': 'integer', 'PhoneNumberField': 'varchar(20)', - 'PositiveIntegerField': 'integer CHECK (%(column)s >= 0)', - 'PositiveSmallIntegerField': 'smallint CHECK (%(column)s >= 0)', + 'PositiveIntegerField': 'integer CHECK ("%(column)s" >= 0)', + 'PositiveSmallIntegerField': 'smallint CHECK ("%(column)s" >= 0)', 'SlugField': 'varchar(50)', 'SmallIntegerField': 'smallint', 'TextField': 'text', |
