Leaklens

django__django-13786

squashmigrations does not unset model options when optimizing CreateModel and AlterModelOptions

Verdict: the issue points to the file or function that was changed (Tier B).

Makes sense, I guess we should take AlterModelOptions.ALTER_OPTION_KEYS in consideration here like AlterModelOptions.state_forwards does

The text points to the exact place to change: “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 991…”

All SWE-bench Verified tasks · more django/django tasks · How the check works