Opened 10 years ago

Closed 10 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: UI/UX:

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@…> 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Ben Khoo <benk@…>

comment:1 Changed 10 years ago by Ben Khoo <benk@…>

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

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

comment:2 Changed 10 years ago by Simon G. <dev@…>

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 Changed 10 years ago by Matt Boersma

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