WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#2589 closed defect (bug) (fixed)

WP DB Backup core tables should reflect new and deleted tables

Reported by: MichaelH Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: bg|has-patch bg|tested bg|commit bg|2nd-opinion
Focuses: Cc:

Description

Add the new 'link2cat' table and delete the old 'linkcategories' table from the "These core WordPress tables will always be backed up:" list in WordPress Database Backup Plugin (wp-db-backup.php).

Attachments (3)

db-backup-plugin_updatedtables.diff (685 bytes) - added by abhay 9 years ago.
db-backup-plugin_updated_tables2.diff (1.2 KB) - added by abhay 9 years ago.
2589.diff (1.7 KB) - added by westi 9 years ago.
New patch updated to use a single array

Download all attachments as: .zip

Change History (12)

comment:1 @abhay9 years ago

  • Keywords bg|has-patch added

Good catch and easy to fix. Patch to come.

comment:2 @MichaelH9 years ago

Thanks abhay, the fix works. I didn't test with Skippy's WP-Cron plugin, but notice there's a reference to tables in the wp-cron-daily function in that plugin. Should that be changed also?

comment:3 @abhay9 years ago

MichaelH: sorry I can't find the reference. Could you give me a "grep --line-number" ?

comment:4 @MichaelH9 years ago

Should have done that to begin with--line 869.

comment:5 @abhay9 years ago

  • Keywords bg|needs-testing added

It's alright. I should have caught it. New patch is up.

@westi9 years ago

New patch updated to use a single array

comment:6 @westi9 years ago

  • Keywords bg|tested bg|commit added; bg|needs-testing removed

I have tested this and it works fine for me.

The cron list of tables was still missing "link2cat" so i have added that in a new patch and moved this list of tables to a class attribute storing them in an array near the top of the file so they are easy to find for updates and only in one place!

I think this is good to go for commit

comment:7 @MichaelH9 years ago

  • Keywords bg|2nd-opinion added

While testing westi's fix on a 2.0.2 to 2.1-alpha1 upgrade, I was reminded that the linkcategories table is being left, intact, on upgrades. With this fix, that table will show in the "You may choose to include any of the following tables" column of WP DB Backup.

Any idea on what to do there, if anything?

Also, any opinion about bumping the Version from 1.7 to 1.7.something?

comment:8 @ryan9 years ago

Eventually, upgrade will drop the linkcategories table. I've been holding off on dropping the table until the bookmark design settled. That has quieted down though, so maybe the time to drop is near.

comment:9 @ryan9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3657]) Update table list in backup plugin. Props abhay and westi. fixes #2589

Note: See TracTickets for help on using tickets.