1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +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:
Tim Graham
2014-12-23 12:27:49 -05:00
parent 69ee7c8d76
commit 061caa5b38
4 changed files with 43 additions and 17 deletions

View File

@@ -431,6 +431,7 @@ class AlterModelOptions(Operation):
# Model options we want to compare and preserve in an AlterModelOptions op
ALTER_OPTION_KEYS = [
"get_latest_by",
"managed",
"ordering",
"permissions",
"default_permissions",