From 06a2dc42b2aad23550e378b6a4dd65bd930133a3 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 9 Dec 2005 03:32:45 +0000 Subject: [PATCH] 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 --- django/core/db/backends/postgresql.py | 4 ++-- 1 file 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',