Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migrations failures caused by changed revision / initial dependecy change #616

Merged
merged 2 commits into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions wagtail_localize/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@

from django.db import migrations, models
import django.db.models.deletion
from wagtail import VERSION as WAGTAIL_VERSION
from wagtail_localize.compat import get_revision_model


class Migration(migrations.Migration):

initial = True

core_migration = (
"0076_modellogentry_revision"
if WAGTAIL_VERSION >= (4, 0)
else "0057_page_locale_fields_notnull"
)
dependencies = [
("wagtailcore", core_migration),
("wagtailcore", "0057_page_locale_fields_notnull"),
("contenttypes", "0002_remove_content_type_name"),
]

run_before = [("wagtailcore", "0059_apply_collection_ordering")]

operations = [
migrations.CreateModel(
name="String",
Expand Down Expand Up @@ -154,7 +149,7 @@ class Migration(migrations.Migration):
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to=get_revision_model(),
to="wagtailcore.PageRevision",
),
),
(
Expand Down