Opened 11 years ago

Closed 11 years ago

Last modified 9 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: UI/UX:

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@… 11 years ago.
inspect-setnull.2.diff (615 bytes) - added by mir@… 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by mir@…

Attachment: inspect-setnull.diff added

comment:1 Changed 11 years ago by Adrian Holovaty

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

Changed 11 years ago by mir@…

Attachment: inspect-setnull.2.diff added

comment:2 Changed 11 years ago by mir@…

Removed first two lines which have confused trac

comment:3 Changed 11 years ago by Adrian Holovaty

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 Changed 11 years ago by mir@…

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