[wp-hackers] WP Developer Edition
mark.wordpress at txfx.net
Tue Apr 17 06:23:26 GMT 2007
On Apr 16, 2007, at 9:37 PM, deko wrote:
> I'm interested in how you will manage your plug-in data when WP is
> upgraded. For example, when a user upgrades from 2.1.3 to 2.2
> (deactivating your plug-in in the process), what happens to the
> data in the plug-in specific table(s)? I've read about the dbdelta
> function (thanks Jamie) http://codex.wordpress.org/
> Creating_Tables_with_Plugins but that addresses upgrades to the
> plug-in table schema. What happens when WP is upgraded to a new db
> schema? Will plug-in specicific table data be persevered?
(1) custom tables (it is only aware of current and past WP tables).
(2) custom columns in WP tables (for instance, if you added a
post_mood column, WordPress would never touch it, unless post_mood
became part of the WordPress schema).
And actually, dbDelta() doesn't do any dropping of columns or
tables... it only alters or adds. The dropping of obsolete WP core
columns and tables is done manually in the upgrade code.
Covered Web Services
More information about the wp-hackers