[Django] #22331: Migrations do not ignore unmanaged models (unlike syncdb)

7 views
Skip to first unread message

Django

unread,
Mar 25, 2014, 9:08:22 AM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
-------------------------------------------+-----------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+-----------------------------
Migrations do not ignore
[https://docs.djangoproject.com/en/dev/ref/models/options/#managed
unmanaged models]. To reproduce, simply add:
{{{
class Meta:
managed=False
}}}
to the models in the tutorial and then
{{{
python manage.py makemigrations polls
python manage.py migrate
}}}
You will see tables are created for these models unlike doing the same and
running `syncdb`.

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

Django

unread,
Mar 25, 2014, 10:04:02 AM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
---------------------------------+---------------------------------------

Reporter: timo | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by loic84):

* cc: loic@… (added)
* has_patch: 0 => 1


Comment:

PR https://github.com/django/django/pull/2474.

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

Django

unread,
Mar 25, 2014, 10:34:32 AM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
---------------------------------+---------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"69d4b1c3ea64f298380b0531c34509ae5eec89b9"]:
{{{
#!CommitTicketReference repository=""
revision="69d4b1c3ea64f298380b0531c34509ae5eec89b9"
Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models.
}}}

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

Django

unread,
Mar 25, 2014, 10:34:44 AM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
---------------------------------+---------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"bf69375c4d2eaec4f00c646b9e7e84a9397d1a20"]:
{{{
#!CommitTicketReference repository=""
revision="bf69375c4d2eaec4f00c646b9e7e84a9397d1a20"
[1.7.x] Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged
models.

Backport of 69d4b1c3ea from master
}}}

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

Django

unread,
Mar 25, 2014, 2:02:13 PM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
---------------------------------+---------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d84beb3d9105300a94061dd94911a0c3cd9021d2"]:
{{{
#!CommitTicketReference repository=""
revision="d84beb3d9105300a94061dd94911a0c3cd9021d2"
Revert "[1.7.x] Fixed #22331 -- Fixed migrations ProjectState to ignore
unmanaged models."

This reverts commit bf69375c4d2eaec4f00c646b9e7e84a9397d1a20.
}}}

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

Django

unread,
Mar 25, 2014, 6:37:34 PM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
---------------------------------+---------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"42336c84a0daedfd8242333622eefe202e32398e"]:
{{{
#!CommitTicketReference repository=""
revision="42336c84a0daedfd8242333622eefe202e32398e"
Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.

This commit reverts 69d4b1c and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
}}}

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

Django

unread,
Mar 25, 2014, 8:12:18 PM3/25/14
to django-...@googlegroups.com
#22331: Migrations do not ignore unmanaged models (unlike syncdb)
---------------------------------+---------------------------------------
Reporter: timo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7-alpha-2
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+---------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"39fc8d4b8e94d9e019148ce9d287e72b3363a7bf"]:
{{{
#!CommitTicketReference repository=""
revision="39fc8d4b8e94d9e019148ce9d287e72b3363a7bf"
[1.7.x] Fixed #22331 -- Made MigrationAutodetector ignore unmanaged
models.

This commit reverts 69d4b1c and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.

Backport of 42336c84a0daedfd8242333622eefe202e32398e from master
}}}

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

Reply all
Reply to author
Forward
0 new messages