Opened 14 years ago
Closed 9 years ago
#14098 closed New feature (fixed)
Prevent introspection errors from crashing inspectdb
Reported by: | Adam Vandenberg | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | inspectdb |
Cc: | anubhav9042@… | 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
If you're inspecting a MySQL db, and it has a view that references missing columns, then inspectdb will stop with an exception while inspecting that database.
Add a "--skip" option to inspectdb to skip over tables that throw errors instead of aborting.
Attachments (3)
Change History (16)
by , 14 years ago
Attachment: | inspect-skip.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 14 years ago
Component: | django-admin.py inspectdb → Core (Management commands) |
---|
comment:4 by , 14 years ago
Easy pickings: | unset |
---|---|
Patch needs improvement: | set |
Severity: | → Normal |
Type: | → Uncategorized |
skip.diff fails to apply cleanly on to trunk
comment:5 by , 14 years ago
If there is still interest in accepting this, I can rework the patch; otherwise a maintainer ought to close it.
comment:6 by , 13 years ago
Type: | Uncategorized → New feature |
---|
comment:7 by , 13 years ago
Keywords: | inspectdb added |
---|---|
UI/UX: | unset |
comment:8 by , 11 years ago
Needs tests: | set |
---|---|
Patch needs improvement: | unset |
Version: | 1.2 → master |
The attached patch, instead of adding a new command parameter, just output in the result that some table was not introspected. For example:
# Unable to inspect table v_test # The error was: View 'test_.v_test' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
comment:9 by , 11 years ago
Cc: | added |
---|
comment:11 by , 9 years ago
Summary: | Add "--skip" option to inspectdb. → Prevent introspection errors from crashing inspectdb |
---|
comment:12 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
The first impression I get from --skip is that you can list tables you don't want to inspect. Better name could be something like --ignore-errors?
Another solution would be to provide --skip-tables and --only-tables, so that one could manually skip the error producing tables.