Plugin Upgrade Strategy

This was recently discussed at length on the wp-hackers list. Here’s the thread:

Quoting Otto from the list:

The simplest method that would work
everywhere would be simply to store
the version number of the plugin
somewhere (like in your options entry
in the database), then compare the
stored version with your known
current and hardcoded version. When
you detect the difference, then that
means an upgrade has taken place, and
you can act accordingly. Another way
is simply to make the plugin detect
outdated options or older schemas and
upgrade them on-the-fly. This is
probably the most reliable, but it
does depend on what exactly you’re
upgrading. You can’t necessarily make
this “generic”.