Is there any way to recover Streamfield data that was lost due to lack of migration?

40 Views Asked by At

I pushed changes to StreamFields in my models (i.e., adding new block types) without creating Migrations, as specified in the docs. This resulted in a large loss of user data, and unfortunately there isn't a recent database backup.

If I were to go digging in a copy of the current Postgres database, would I be able to find the lost user data in the version history somehow? I'm also open to any other suggestions about how to recover the lost data, if possible.

1

There are 1 best solutions below

0
Igor Margitich On

From your question is not really clear what you did:

  1. Did you add/edit block to StreamField? In most cases should not remove data
  2. Did you migrate RichTextFields to StreamField? This indeed very likely replaced existing data

But in any case first check database and especially wagtailcore_revision table. It has content field which is json copy of all fields of the current page.