Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 06a2dc42b2aad23550e378b6a4dd65bd930133a3 1 parent 7d0bcc5
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/db/backends/postgresql.py
View
4 django/core/db/backends/postgresql.py
@@ -174,8 +174,8 @@ def get_relations(cursor, table_name):
'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',
Please sign in to comment.
Something went wrong with that request. Please try again.