kopia lustrzana https://github.com/wagtail/wagtail
Eliminate dependencies on `__latest__` migrations
See https://groups.google.com/d/msg/wagtail/a1lbdKe-QPk/GefsBFnRBgAJ - using __latest__ prevents us from ever applying migrations that are subsequently added to the referenced apps, since logically those migrations must have been applied before the current one (which they weren't, because they didn't exist). This logic is enforced as of Django 1.10.pull/2702/head
rodzic
b13441e108
commit
e31b26c4db
|
@ -18,6 +18,7 @@ Changelog
|
|||
* Added ability to limit access to form submissions (Mikalai Radchuk)
|
||||
* Added the ability to configure the number of days search logs are kept for (Stephen Rice)
|
||||
* Fix: Migrations for wagtailcore and project template are now reversible (Benjamin Bach)
|
||||
* Fix: Migrations no longer depend on wagtailcore and taggit's `__latest__` migration, logically preventing those apps from receiving new migrations (Matt Westcott)
|
||||
* Fix: The default image format label text ('Full width', 'Left-aligned', 'Right-aligned') is now localised (Mikalai Radchuk)
|
||||
* Fix: Text on the front-end 'password required' form is now marked for translation (Janneke Janssen)
|
||||
* Fix: Text on the page view restriction form is now marked for translation (Luiz Boaretto)
|
||||
|
|
|
@ -53,6 +53,7 @@ Bug fixes
|
|||
~~~~~~~~~
|
||||
|
||||
* Migrations for wagtailcore and project template are now reversible (Benjamin Bach)
|
||||
* Migrations no longer depend on wagtailcore and taggit's ``__latest__`` migration, logically preventing those apps from receiving new migrations (Matt Westcott)
|
||||
* The default image format label text ('Full width', 'Left-aligned', 'Right-aligned') is now localised (Mikalai Radchuk)
|
||||
* Text on the front-end 'password required' form is now marked for translation (Janneke Janssen)
|
||||
* Text on the page view restriction form is now marked for translation (Luiz Boaretto)
|
||||
|
@ -67,6 +68,26 @@ Bug fixes
|
|||
Upgrade considerations
|
||||
======================
|
||||
|
||||
Project template's initial migration should not depend on ``wagtailcore.__latest__``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
On projects created under previous releases of Wagtail, the ``home/migrations/0001_initial.py`` migration created by the ``wagtail start`` command contains the following dependency line:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '__latest__'),
|
||||
]
|
||||
|
||||
This may produce ``InconsistentMigrationHistory`` errors under Django 1.10 when upgrading Wagtail, since Django interprets this to mean that no new migrations can legally be added to wagtailcore after this migration is applied. This line should be changed to:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '0029_unicode_slugfield_dj19'),
|
||||
]
|
||||
|
||||
|
||||
.. _filter_spec_migration:
|
||||
|
||||
Custom image models require a data migration for the new ``filter_spec`` field
|
||||
|
|
|
@ -7,7 +7,7 @@ from django.db import migrations, models
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '__latest__'),
|
||||
('wagtailcore', '0029_unicode_slugfield_dj19'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
|
@ -11,7 +11,7 @@ import wagtail.wagtailsearch.index
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('taggit', '__latest__'),
|
||||
('taggit', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import wagtail.wagtailsearch.index
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('taggit', '__latest__'),
|
||||
('taggit', '0001_initial'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue