[wp-hackers] Lost categories upgrading to 2.5.1

Otto otto at ottodestruct.com
Wed Apr 30 18:29:56 GMT 2008

On Wed, Apr 30, 2008 at 12:39 PM, Alan J Castonguay <alan at verselogic.net> wrote:
>  The section of the upgrade script that creates / populates wp_terms, and
> the part that drops the old tables, should be an atomic operation. If the
> data can't be imported into wp_terms, for whatever reason (server
> mis-configuration, etc), full stop, don't blindly attempt to drop the source
> tables.

I'll go further and say that the entire upgrade should be atomic. If
any part of the upgrade fails, no changes should take place at all.

The very first thing the upgrade should do is to start a transaction.
If there's a failure at any point, a rollback should be issued. If it
gets to the end, a commit can be done.

That is does not do this already makes little sense to me, as it's
easy enough to do.

More information about the wp-hackers mailing list