Conversation started Jun 11, 2014 at 16:13.
Jun 11, 2014 16:13
How are you supposed to handle updates which require changes to the database? I mean, let's say in version 1.0 you had your original DB structure setup. Then along the way, you've released 10 different updates to your plugin... All of which have made a change to the database in each of the 10 updates. Now you're at version 2.0 ... How do you handle an upgrade from let's say ... 1.3 to 2.0?
Are you supposed to have an upgrade script for each version which database changes have been made, then detect what ever current version they have installed and compare against the current version being installed, and run each upgrade script from 1.3 to 2.0?
Or am I over thinking it?
@MichaelEcklund have a db version value, when it changes upgrade the database accordingly
how you do that depends on the nature of the changes
most plugins I write endeavour to use the wp core data architecture rather than adding their own
Well It's easy to do the upgrade if they're updating each release at a time, but if they miss 7 updates before they finally update, how do you handle that?
@MichaelEcklund Send them through each routine in turn.
So yes, you need to keep all your upgrade routines.
So I need to have an upgrade from 1.0 to 1.1, and from 1.1 to 1.2, etc...
I removed one once - it was about 18 months old. I had people complain.
Jun 11, 2014 16:17
where do you draw the line for backwards compatibility?
@MichaelEcklund I drew it at 18 months ;). Since then there has been no major changes, so I've just kept it.
Or maybe that's the wrong term to use. Where do you draw the line for providing updates from version to version?
ya? Why not just a solid 24 months? That's 2 years.
why would you even want to do that?
iterator over upgrades from current version in production to current release.
that's a no brainer
@MichaelEcklund In short, keep it indefinitely. I decided to remove some code at 18 months, and didn't care about those who were still using v. v. old versions. It came back to hit me.
@kaiser Right, so what @StephenHarris was saying about keeping upgrade routines. -- I need to keep ALL my upgrades from each version which changes the database in my plugin upgrader.
 
Conversation ended Jun 11, 2014 at 16:20.