mirror of
https://github.com/django/django.git
synced 2025-08-02 18:13:02 +00:00
Fixed #24037 -- Prevented data loss possibility when changing Meta.managed.
The migrations autodetector now issues AlterModelOptions operations for Meta.managed changes instead of DeleteModel + CreateModel. Thanks iambibhas for the report and Simon and Markus for review.
This commit is contained in:
parent
69ee7c8d76
commit
061caa5b38
4 changed files with 43 additions and 17 deletions
|
@ -162,3 +162,8 @@ Bugfixes
|
|||
* Added ``datetime.time`` support to migrations questioner (:ticket:`23998`).
|
||||
|
||||
* Fixed admindocs crash on apps installed as eggs (:ticket:`23525`).
|
||||
|
||||
* Changed migrations autodetector to generate an ``AlterModelOptions`` operation
|
||||
instead of ``DeleteModel`` and ``CreateModel`` operations when changing
|
||||
``Meta.managed``. This prevents data loss when changing ``managed`` from
|
||||
``False`` to ``True`` and vice versa (:ticket:`24037`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue