This commit is contained in:
parent
eee8643c53
commit
b73c896b5b
|
@ -274,6 +274,12 @@ function wc_admin_update_300_update_is_read_from_last_read() {
|
||||||
*/
|
*/
|
||||||
function wc_admin_update_340_remove_is_primary_from_note_action() {
|
function wc_admin_update_340_remove_is_primary_from_note_action() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
||||||
|
// The column might not exist, since this update function was moved from 340 to 640.
|
||||||
|
if ( ! $wpdb->query( "SHOW COLUMNS FROM {$wpdb->prefix}wc_admin_note_actions LIKE 'is_primary'" ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_admin_note_actions DROP COLUMN `is_primary`" );
|
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_admin_note_actions DROP COLUMN `is_primary`" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue