mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.7.x] 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.
Backport of 061caa5b38 from master
This commit is contained in:
@@ -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`).
|
||||
|
||||
Reference in New Issue
Block a user