Code

Opened 7 years ago

Closed 7 years ago

#3722 closed (fixed)

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

Reported by: Ben Khoo <benk@…> Owned by: adrian
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@…> 7 years ago.

Download all attachments as: .zip

Change History (4)

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

comment:1 Changed 7 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 7 years ago by Simon G. <dev@…>

  • Component changed from Uncategorized to Database wrapper
  • Owner changed from jacob to adrian
  • Summary changed from Minimum value of an Oracle PositiveIntegerField should be zero to [boulder-oracle] Minimum value of an Oracle PositiveIntegerField should be zero
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 7 years ago by bouldersprinters

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.