[Django] #24876: Skipping migrations checking in sql* commands

12 views
Skip to first unread message

Django

unread,
May 29, 2015, 12:33:32 PM5/29/15
to django-...@googlegroups.com
#24876: Skipping migrations checking in sql* commands
-------------------------------+--------------------
Reporter: marcinn | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
There are some IT projects that do not require Django`s builtin migrations
but use external migration tool. As a maintainer of projects of that type
I need to generate SQLs from models in same way as before Django 1.7.

Currently when I need to generate SQL for `auth` package using `sql`,
`sqlall` and `sqlindexes` commands, I'm getting an error:

{{{
CommandError: App 'auth' has migrations. Only the sqlmigrate and sqlflush
commands can be used when an app has migrations.
}}}

But I'm expecting generated SQL instead.

Please add possibility to generate SQL for smart users which know what
they are doing.

I'm sending patch proposal as an attachment.

Please backport this fix to 1.7 and 1.8 branches.

Thank you very much.

--
Ticket URL: <https://code.djangoproject.com/ticket/24876>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 29, 2015, 12:34:22 PM5/29/15
to django-...@googlegroups.com
#24876: Skipping migrations checking in sql* commands
---------------------------+----------------------------

Reporter: marcinn | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------+----------------------------
Changes (by marcinn):

* Attachment "force-generating-sql.diff" added.

Patch proposal

Django

unread,
May 29, 2015, 12:49:35 PM5/29/15
to django-...@googlegroups.com
#24876: Skipping migrations checking in sql* commands
-------------------------------+--------------------------------------
Reporter: marcinn | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 1.8
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0


Comment:

Duplicate of #24481. We'll need a new proposal for master as the affected
sql* management commands have been removed there. A change is unlikely to
be backported per our [https://docs.djangoproject.com/en/dev/internals
/release-process/#supported-versions supported versions policy].

--
Ticket URL: <https://code.djangoproject.com/ticket/24876#comment:1>

Reply all
Reply to author
Forward
0 new messages