infinitered / thesis-phoenix

A lightweight, bolt-on, intuitive content editing system for Elixir/Phoenix websites. Star this repo and follow along with our progress!
Other
645 stars 62 forks source link

adds migration to convert compressed backup data to json #133

Closed yulolimum closed 6 years ago

yulolimum commented 7 years ago

Resolves #129

@jamonholmgren I manually tested this on a few local sites and on the example apps. I have no idea how to test migrations programatically. You may have to help me on this.

Edit: Updated description here

jamonholmgren commented 7 years ago

@yulolimum Luckily, the worst that can happen is that a few older content revisions are lost. What's your confidence level that this code works?

yulolimum commented 7 years ago

@jamonholmgren, the code works. I do however want to add a friendly error message for people that upgrade but do not run migrations and try to restore. if that happen, itll restore a binary bitstring that will most likely break the JS. not sure if its worth it due to the low amount of sites running the backups release but still could be better ux. we can remove this error message a few major releases later.

jamonholmgren commented 7 years ago

Good idea, let's add that.

yulolimum commented 6 years ago

@jamonholmgren @ryanlntn @zberkom

This PR is finally feature complete. I went through the code and annotated a ton since the PR is pretty big.

The PR adds:

Note, as stated previously, testing migrations is kind of hard. I ran the code across a few sites and it converts everything perfectly without issues. Our site as an example had 250 backups and it took a couple seconds to convert.

Screenshots:

jamonholmgren commented 6 years ago

~There are conflicts on this.~ NVM, it's good. Ready to go. ✅