Django

Code

Ticket #3722 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: Ben Khoo <benk@calytrix.com> Assigned to: adrian
Milestone: Component: Database layer (models, ORM)
Version: other branch Keywords: Oracle PositiveIntegerField
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

oracle_positiveinteger.patch (0.9 kB) - added by Ben Khoo <benk@calytrix.com> on 03/13/07 23:30:15.

Change History

03/13/07 23:30:15 changed by Ben Khoo <benk@calytrix.com>

  • attachment oracle_positiveinteger.patch added.

03/13/07 23:31:16 changed by Ben Khoo <benk@calytrix.com>

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

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

03/14/07 00:04:22 changed by Simon G. <dev@simon.net.nz>

  • 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.
  • component changed from Uncategorized to Database wrapper.
  • stage changed from Unreviewed to Ready for checkin.

03/14/07 14:58:18 changed by bouldersprinters

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #3722 ([boulder-oracle] Minimum value of an Oracle PositiveIntegerField should be zero)




Change Properties
Action