#23416 closed Bug (fixed)
Django 1.7 fails to output a CHECK constraint on PositiveIntegerFields using postgres backend
Reported by: | ris | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7 |
Severity: | Release blocker | Keywords: | postgres check constraint positiveintegerfield |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
As title says.
In models.py:
maximum_percentage = models.PositiveIntegerField ( null = True , blank = True )
sqlall line from django 1.6:
"maximum_percentage" integer CHECK ("maximum_percentage" >= 0),
sqlall line from django 1.7:
"maximum_percentage" integer,
Change History (5)
comment:1 by , 10 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
Added a PR https://github.com/django/django/pull/3161
It is worth noting that if you are using migrations this will not happen.
comment:3 by , 10 years ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Confirmed and traced it back to d22b291890c1736a40c0ad97448c7318df2eebb2 using git bisect.
Thanks!