Opened 9 years ago

Closed 2 years ago

Last modified 2 years ago

#5726 closed Cleanup/optimization (fixed)

Document that inspectdb doesn't detect default values

Reported by: anonymous Owned by: nobody
Component: Documentation Version: master
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

Testing with MySQL, no default values are used from the table definition.

Attachments (1)

5726.diff (813 bytes) - added by Tim Graham 2 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by Jacob

Triage Stage: UnreviewedSomeday/Maybe

comment:2 Changed 6 years ago by Gabriel Hurley

Component: django-admin.py inspectdbCore (Management commands)

comment:3 Changed 6 years ago by Gabriel Hurley

Severity: Normal
Type: New feature

comment:4 Changed 5 years ago by ricardodani

Easy pickings: unset
UI/UX: unset

With PostgreSQL too.

comment:5 Changed 5 years ago by Ramiro Morales

Keywords: inspectdb added

comment:6 Changed 2 years ago by Tim Graham

Component: Core (Management commands)Documentation
Summary: inspectdb should recognize default valuesDocument that inspectdb doesn't detect default values
Triage Stage: Someday/MaybeAccepted
Type: New featureCleanup/optimization

Translating database level defaults into model field defaults isn't functionally equivalent and given that Django doesn't translate the model field default option into a database level default, I think it would be inconsistent to do a conversion in the other direction.

However, we can document the reason that this isn't supported.

Changed 2 years ago by Tim Graham

Attachment: 5726.diff added

comment:7 Changed 2 years ago by Tim Graham

Has patch: set

comment:8 Changed 2 years ago by Claude Paroz

Triage Stage: AcceptedReady for checkin

comment:9 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 15cafaa5657bae31df6e515b425dd353b7352aa3:

Fixed #5726 -- Documented that inspectdb doesn't detect defaults.

comment:10 Changed 2 years ago by Tim Graham <timograham@…>

In d6c6181f9ecf90be7d298c670ce23c0327417bb7:

[1.7.x] Fixed #5726 -- Documented that inspectdb doesn't detect defaults.

Backport of 15cafaa565 from master

comment:11 Changed 2 years ago by Tim Graham <timograham@…>

In 75d7bb8d4313f83a832a65cc5e9b17b8ccf97fd1:

[1.6.x] Fixed #5726 -- Documented that inspectdb doesn't detect defaults.

Backport of 15cafaa565 from master

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