Repository: wagtail/wagtail

Issue:
Migrating to 1.1 Migration File Errors
I am attempting to migrate to 1.1 and I am getting an error involving the migration files.

```
Migration wagtailcore.0017_change_edit_page_permission_description dependencies reference nonexistent parent node (u'wagtailcore', u'0001_squashed_0016_change_page_url_path_to_text_field')
```

The last migration for wagtail core in my migrations table is 0015. Since 0017 refers to 0001_squashed_0016 as a dependency and since I have not applied that migration, it's turn up as an error.

I tried manually applying 0016, but the error is preventing that from happening.

I know the issue queue is not intended for support questions, but I was speaking in the #django irc channel and they told me to check and see if the migrations were autogenerated. They said that normally migrations refer to the one before it and not the squashed ones.

Migrating to 1.1 Migration File Errors
I am attempting to migrate to 1.1 and I am getting an error involving the migration files.

```
Migration wagtailcore.0017_change_edit_page_permission_description dependencies reference nonexistent parent node (u'wagtailcore', u'0001_squashed_0016_change_page_url_path_to_text_field')
```

The last migration for wagtail core in my migrations table is 0015. Since 0017 refers to 0001_squashed_0016 as a dependency and since I have not applied that migration, it's turn up as an error.

I tried manually applying 0016, but the error is preventing that from happening.

I know the issue queue is not intended for support questions, but I was speaking in the #django irc channel and they told me to check and see if the migrations were autogenerated. They said that normally migrations refer to the one before it and not the squashed ones.



Discussion:
What version of Wagtail are you upgrading from? I have experienced similar issues when jumping multiple versions at once, usually going from 0.8.x to 1.1. If this is the case for you, try upgrading to 1.0, running the migrations, and then upgrading to 1.1 and running the rest of the migrations.

I believe it was pre 1.0, I will give this a shot, thanks.

Is this something we can solve in 1.2?

Perhaps we should just document that you can't block update from Wagtail 0.8 to Wagtail 1.1

I reckon it's worth trying to replicate this and seeing if changing the dependencies to point to non-squashed migrations fixes it.

What version of Wagtail are you upgrading from? I have experienced similar issues when jumping multiple versions at once, usually going from 0.8.x to 1.1. If this is the case for you, try upgrading to 1.0, running the migrations, and then upgrading to 1.1 and running the rest of the migrations.

I believe it was pre 1.0, I will give this a shot, thanks.

Is this something we can solve in 1.2?

Perhaps we should just document that you can't block update from Wagtail 0.8 to Wagtail 1.1

I reckon it's worth trying to replicate this and seeing if changing the dependencies to point to non-squashed migrations fixes it.


Resolving patch:
diff --git a/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py b/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py
--- a/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py
+++ b/wagtail/wagtailcore/migrations/0017_change_edit_page_permission_description.py
@@ -7,7 +7,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('wagtailcore', '0001_squashed_0016_change_page_url_path_to_text_field'),
+        ('wagtailcore', '0016_change_page_url_path_to_text_field'),
     ]
 
     operations = [


Test patch: