Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#22331 closed Bug (fixed)

Migrations do not ignore unmanaged models (unlike syncdb)

Reported by: timo Owned by: nobody
Component: Migrations Version: 1.7-alpha-2
Severity: Release blocker Keywords:
Cc: loic@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Migrations do not ignore 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.

Change History (6)

comment:1 Changed 11 months ago by loic84

  • Cc loic@… added
  • Has patch set

comment:2 Changed 11 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 69d4b1c3ea64f298380b0531c34509ae5eec89b9:

Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models.

comment:3 Changed 11 months ago by Tim Graham <timograham@…>

In bf69375c4d2eaec4f00c646b9e7e84a9397d1a20:

[1.7.x] Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models.

Backport of 69d4b1c3ea from master

comment:4 Changed 11 months ago by Tim Graham <timograham@…>

In d84beb3d9105300a94061dd94911a0c3cd9021d2:

Revert "[1.7.x] Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models."

This reverts commit bf69375c4d2eaec4f00c646b9e7e84a9397d1a20.

comment:5 Changed 11 months ago by Tim Graham <timograham@…>

In 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.

comment:6 Changed 11 months ago by Tim Graham <timograham@…>

In 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

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