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 Vidir Valberg Gudmundsson, 11 years ago

Has patch: set
Patch needs improvement: set

I did a PR for this:

https://github.com/django/django/pull/2743

But something went wrong and apollo13 reverted it.

comment:2 by Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Andrew Godwin, 11 years ago

Severity: NormalRelease 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 Andrew Godwin <andrew@…>, 11 years ago

Resolution: fixed
Status: newclosed

In f70f669941775ceef8433f4c66b189f82d53074f:

Fixed #22749: Making SQL management commands migration aware.

comment:5 by Andrew Godwin <andrew@…>, 11 years ago

In 3fc4f03895ae356a5861d0385de71e7a590811b6:

[1.7.x] Fixed #22749: Making SQL management commands migration aware.

comment:6 by Aymeric Augustin, 11 years ago

Resolution: fixed
Status: closednew

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 Andrew Godwin, 11 years ago

Resolution: fixed
Status: newclosed

I've fixed that test. Re-closing.

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