Opened 11 years ago
Closed 11 years ago
#22749 closed Cleanup/optimization (fixed)
Making SQL management commands migration aware.
Reported by: | Vidir Valberg Gudmundsson | Owned by: | nobody |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
The SQL management commands, except sqlflush and sqlmigrate, do not make sense for an app with migrations. Therefore the user should be notified of this when trying to run these commands.
Change History (7)
comment:1 by , 11 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
comment:2 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 11 years ago
Severity: | Normal → Release blocker |
---|
The issue was that sql_delete closes the connection which mucks things up later on in the tests. The solution is to either:
a) Find out how other code tests it without breaking (if there are tests) and use that, or
b) Add an option to sql_delete where it doesn't close the connection.
Also marking this as RB as it's an easy fix I wanna see in the release.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
This commit broke commands_sql.tests.SQLCommandsRouterTestCase.test_router_honored
on PostgreSQL and MySQL (at least), see ci.djangoproject.com for details.
comment:7 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've fixed that test. Re-closing.
I did a PR for this:
https://github.com/django/django/pull/2743
But something went wrong and apollo13 reverted it.