`CreateModel.reduce()` sets the new options as `options={**self.options,
**operation.options}` in this case
(`django/db/migrations/operations/models.py` line 144 on commit
`991dce4f`), with no logic to remove options not found in
`operation.options` as is found in `AlterModelOptions.state_forwards()`.
I believe this issue still exists on the master branch based on my reading
of the code, but I've only tested against 2.2.
--
Ticket URL: <https://code.djangoproject.com/ticket/32262>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: InvalidInterrupt (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/32262#comment:1>
* stage: Unreviewed => Accepted
Comment:
Makes sense, I guess we should take `AlterModelOptions.ALTER_OPTION_KEYS`
in consideration here like `AlterModelOptions.state_forwards` does
--
Ticket URL: <https://code.djangoproject.com/ticket/32262#comment:2>
* owner: nobody => Hasan Ramezani
* status: new => assigned
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13786 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32262#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32262#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"8d582bf51058e3a8094a58f624c81bd95b6edfb1" 8d582bf]:
{{{
#!CommitTicketReference repository=""
revision="8d582bf51058e3a8094a58f624c81bd95b6edfb1"
Fixed #32262 -- Fixed migration optimization for model creation and Meta
options removal.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32262#comment:5>