Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#1562 closed defect (fixed)

[patch] inspectdb: set blank and null attributes

Reported by: mir@… Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version: magic-removal
Severity: normal Keywords: inspectdb
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

inspectdb does now set blank and null attributes correctly. The attached patch corrects this.

Attachments (2)

inspect-setnull.diff (712 bytes ) - added by mir@… 18 years ago.
inspect-setnull.2.diff (615 bytes ) - added by mir@… 18 years ago.

Download all attachments as: .zip

Change History (6)

by mir@…, 18 years ago

Attachment: inspect-setnull.diff added

comment:1 by Adrian Holovaty, 18 years ago

This detection doesn't appear to work in PostgreSQL. Which database did you test this with?

by mir@…, 18 years ago

Attachment: inspect-setnull.2.diff added

comment:2 by mir@…, 18 years ago

Removed first two lines which have confused trac

comment:3 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [2692]) magic-removal: Fixed #1562 -- Added null and blank detection to 'inspectdb'. Appears only to work for MySQL at this point.

comment:4 by mir@…, 18 years ago

Argl. Setting the right column for "null_ok" in the cursor.descriptor is not mandatory in the DB-API 2.0, and psycopg (at least 1.1.21) always sets it to None.

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