[Django] #19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account

22 views
Skip to first unread message

Django

unread,
Jan 23, 2013, 9:24:23 AM1/23/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.4
commands) | Keywords: sql sqlall database
Severity: Normal | router
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
When synchronizing the database, sql for models will appear in all
databases, this is, not respecting allow_syncdb returning False.

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

Django

unread,
Jan 23, 2013, 9:50:55 AM1/23/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Core (Management | Version: 1.4
commands) | Resolution:
Severity: Normal | Triage Stage:
Keywords: sql sqlall database | Unreviewed
router | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by manelclos@…):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


Comment:

Patch at https://github.com/django/django/pull/667

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

Django

unread,
Feb 9, 2013, 9:17:00 AM2/9/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 1.4
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: sql sqlall database | Needs documentation: 0
router | Patch needs improvement: 1
Has patch: 1 | UI/UX: 0
Needs tests: 1 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_better_patch: 0 => 1
* type: Uncategorized => Bug
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

I don't think you need to add a new parameter to the `sql_*` functions, as
you should be able to get the db alias through `connection.alias` (to be
confirmed).

I noticed that the sql_* were missing tests. This might need a new
regressiontests/sql_commands test directory.
http://ci.djangoproject.com/job/Django%20Coverage/HTML_Coverage_Report/_var_lib_jenkins_jobs_Django%20Coverage_workspace_django_core_management_commands_sql.html

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:2>

Django

unread,
Feb 9, 2013, 10:35:53 AM2/9/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 1.4
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: sql sqlall database | Needs documentation: 0
router | Patch needs improvement: 1
Has patch: 1 | UI/UX: 0
Needs tests: 1 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by claudep):

I've just added some base tests for those commands:
[718afcafc202940cd15799459178a2534b8217d5]

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:3>

Django

unread,
May 25, 2013, 1:58:01 PM5/25/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 1.4
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: sql sqlall database | Needs documentation: 0
router | Patch needs improvement: 0

Has patch: 1 | UI/UX: 0
Needs tests: 0 |

Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0


Comment:

New pull request in https://github.com/django/django/pull/1216

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:4>

Django

unread,
May 26, 2013, 4:57:46 PM5/26/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 1.4
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: sql sqlall database | Needs documentation: 0
router | Patch needs improvement: 1

Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by gcc):

* needs_better_patch: 0 => 1


Comment:

Please could you add tests that the correct value of
`include_auto_created` is passed for each set of SQL statements, and that
it's honoured correctly by the `filtered_app_models` function?

Actually, would it make more sense for `filtered_app_models` to be a
method of `Router`, so that it's easier to override?

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:5>

Django

unread,
May 30, 2013, 8:51:27 AM5/30/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new

Component: Core (Management | Version: 1.4
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: sql sqlall database | Needs documentation: 0
router | Patch needs improvement: 0

Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* needs_better_patch: 1 => 0


Comment:

I've just added a second commit to the PR to address your latest concern.

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:6>

Django

unread,
Oct 12, 2013, 5:56:21 PM10/12/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master

commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: sql sqlall database | Needs documentation: 0
router | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by claudep):

* version: 1.4 => master


Comment:

Pull request just updated.

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:7>

Django

unread,
Oct 16, 2013, 10:21:44 AM10/16/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: sql sqlall database | checkin

router | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:8>

Django

unread,
Oct 16, 2013, 12:03:51 PM10/16/13
to django-...@googlegroups.com
#19657: sql, sqlcustom, sqlindexes and sqlall do not take allow_syncdb into account
-------------------------------------+-------------------------------------
Reporter: manelclos@… | Owner: nobody
Type: Bug | Status: closed

Component: Core (Management | Version: master
commands) | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: sql sqlall database | checkin
router | Needs documentation: 0
Has patch: 1 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"2992f428614349b0dfe0f4183905f492fd3f62c2"]:
{{{
#!CommitTicketReference repository=""
revision="2992f428614349b0dfe0f4183905f492fd3f62c2"
Fixed #19657 -- Made sql commands honor allow_migrate

Thanks Manel Clos for the report and the initial patch, and
Marc Tamlyn and Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/19657#comment:9>

Reply all
Reply to author
Forward
0 new messages