add note about fixing old migrations that break on the expired column

stable/0.4.x v0.4
Matt Westcott 2014-07-10 16:28:51 +01:00
rodzic a9b247b781
commit ea7db7ba97
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -144,6 +144,16 @@ If you are using the elasticsearch backend, you must install the ``elasticsearch
If you are using an older version of Elasticsearch (< 1.0) you must install ``elasticsearch`` version 0.4.x.
Addition of ``expired`` column may break old data migrations involving pages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The scheduled publishing mechanism adds an ``expired`` field to wagtailcore.Page, defaulting to False. Any application code working with Page objects should be unaffected, but any code that creates page records using direct SQL, or within existing South migrations using South's frozen ORM, will fail as this code will be unaware of the ``expired`` database column. To fix a South migration that fails in this way, add the following line to the ``'wagtailcore.page'`` entry at the bottom of the migration file:
.. code-block:: python
'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
Deprecated features
===================