#14305 closed New feature (fixed)
inspectdb should output unmanaged model definitions
Reported by: | Erin Kelly | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | inspectdb unmanaged |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm a little surprised that this hasn't been brought up before, but I couldn't find any existing tickets or discussion.
inspectdb should automatically set managed = False
on the model definitions it creates. Since these are preexisting tables, the user almost certainly does not want Django attempting to drop them when a reset is run.
Attachments (1)
Change History (11)
by , 14 years ago
Attachment: | inspectdb-unmanaged.diff added |
---|
comment:1 by , 14 years ago
Has patch: | set |
---|---|
Needs documentation: | set |
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
Version 0, edited 14 years ago by (next)
comment:2 by , 14 years ago
Component: | django-admin.py inspectdb → Core (Management commands) |
---|
comment:3 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:13 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Accepting on the basis this could mean user data is at risk and it is better to to go with the safe choice, the additional work for the developer to remove the managed=False line would serve as an explicit opt in about allowing Django to handle the table.