Opened 18 years ago

Closed 18 years ago

#3722 closed (fixed)

[boulder-oracle] Minimum value of an Oracle PositiveIntegerField should be zero

Reported by: Ben Khoo <benk@…> Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: other branch
Severity: Keywords: Oracle 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

In order to be consistent with PostgreSQL the PositiveIntegerField and PositiveSmallIntegerField should begin at zero instead of one.

Currently it reads (django\django\db\backends\oracle\creation.py)

'PositiveIntegerField':         'NUMBER(11) CHECK (%(column)s >= 1)',
'PositiveSmallIntegerField':    'NUMBER(11) CHECK (%(column)s >= 1)',

however I believe it should be

'PositiveIntegerField':         'NUMBER(11) CHECK (%(column)s >= 0)',
'PositiveSmallIntegerField':    'NUMBER(11) CHECK (%(column)s >= 0)',

PostgreSQL uses the following (django\django\db\backends\postgresql\creation.py)

'PositiveIntegerField': 'integer CHECK ("%(column)s" >= 0)',
'PositiveSmallIntegerField': 'smallint CHECK ("%(column)s" >= 0)',

Attachments (1)

oracle_positiveinteger.patch (909 bytes ) - added by Ben Khoo <benk@…> 18 years ago.

Download all attachments as: .zip

Change History (4)

by Ben Khoo <benk@…>, 18 years ago

comment:1 by Ben Khoo <benk@…>, 18 years ago

I forgot to mention that I am using the boulder-oracle-sprint branch.

comment:2 by Simon G. <dev@…>, 18 years ago

Component: UncategorizedDatabase wrapper
Owner: changed from Jacob to Adrian Holovaty
Summary: Minimum value of an Oracle PositiveIntegerField should be zero[boulder-oracle] Minimum value of an Oracle PositiveIntegerField should be zero
Triage Stage: UnreviewedReady for checkin

comment:3 by Matt Boersma, 18 years ago

Resolution: fixed
Status: newclosed

(In [4725]) boulder-oracle-sprint: Fixed #3722. Thanks to Ben Khoo for the catch and the
patch.

Note: See TracTickets for help on using tickets.
Back to Top