Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#1562 closed defect (fixed)

[patch] inspectdb: set blank and null attributes

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

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by mir@…

comment:1 Changed 8 years ago by adrian

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

Changed 8 years ago by mir@…

comment:2 Changed 8 years ago by mir@…

Removed first two lines which have confused trac

comment:3 Changed 8 years ago by adrian

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

(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 8 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.

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.