Opened 8 years ago

Closed 13 months ago

Last modified 13 months 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 timgraham 13 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Someday/Maybe

comment:2 Changed 4 years ago by gabrielhurley

  • Component changed from django-admin.py inspectdb to Core (Management commands)

comment:3 Changed 4 years ago by gabrielhurley

  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 4 years ago by ricardodani

  • Easy pickings unset
  • UI/UX unset

With PostgreSQL too.

comment:5 Changed 4 years ago by ramiro

  • Keywords inspectdb added

comment:6 Changed 13 months ago by timo

  • Component changed from Core (Management commands) to Documentation
  • Summary changed from inspectdb should recognize default values to Document that inspectdb doesn't detect default values
  • Triage Stage changed from Someday/Maybe to Accepted
  • Type changed from New feature to Cleanup/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 13 months ago by timgraham

comment:7 Changed 13 months ago by timgraham

  • Has patch set

comment:8 Changed 13 months ago by claudep

  • Triage Stage changed from Accepted to Ready for checkin

comment:9 Changed 13 months ago by Tim Graham <timograham@…>

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

In 15cafaa5657bae31df6e515b425dd353b7352aa3:

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

comment:10 Changed 13 months 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 13 months 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