1

I was wondering is there is any documentation or good resources on migrating Page models, Streamfields, and Blocks in wagtail CMS. All of this seems to not be documented much.

David B
  • 345
  • 3
  • 14
  • I think there is relatively little documentation because every use case is so different. If you can phrase your question to express exactly what you want to achieve (Copy a whole db? Move some content from one server to another? Copy just the content in one app? With or without page revisions? How do you want to export or import? etc.), people will be able to help more easily. – shacker Apr 14 '17 at 22:57

1 Answers1

2

The official documentation has a page about StreamField, which has a section about migrations. It gives a fairly detailed description of how StreamField definitions differ from normal model fields, and the fact that migrations have been specially catered for in StreamField's design. I know that this was the biggest headache that the author faced when developing the feature.

There is also a handy guide on how to convert an existing RichTextField to a StreamField, and just yesterday, Wagtail pull request #3014 was merged, extending that documentation example.

Mark Chackerian
  • 21,866
  • 6
  • 108
  • 99
nimasmi
  • 3,978
  • 1
  • 25
  • 41
  • 1
    Thank you for the information. I found this in the docs but it is extremely thin compared to how important content migrations are for a CMS. So I was wondering if I was missing something in the docs or if someone has written any good articles about it. – David B Mar 31 '17 at 20:03
  • I think without knowing a specific situation it's hard to know what further information you're looking for. I assumed that you're familiar with Django, but in case not, know that Wagtail is built on Django, and Django's migrations feature is well documented at https://docs.djangoproject.com/en/1.10/topics/migrations/. Perhaps the Wagtail documentation's reliance on that implicit knowledge makes the Wagtail-specific migration documentation appear incomplete. Otherwise feel free to post a more specific question with code samples. – nimasmi Mar 31 '17 at 20:30