[wp-trac] [WordPress Trac] #51288: Drop deprecated database column upon upgrade

WordPress Trac noreply at wordpress.org
Thu Sep 10 15:59:36 UTC 2020


#51288: Drop deprecated database column upon upgrade
--------------------------+------------------------------
 Reporter:  leogermani    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by leogermani):

 Test Instructions:

 Alter your local database and add a `post_category` column to the
 `wp_posts` table.

 Apply this patch.

 Reload admin.
 - you should get a notice to Upgrade the DB
 - Click Upgrade
 - Check your database and verify the column was dropped.


 Test if no errors are triggered if column not present.

 Restore your current db version to force a new upgrade:
 - `wp option set db_version 51287`
 - Visit the dashboard again
 - You should see the Upgrade notice
 - Upgrade
 - Make sure there were no errors or warnings

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51288#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list