Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/ninja-fo.../includes/Database/Migratio...
File: ActionMeta.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;
[0] Fix | Delete
[1] Fix | Delete
class NF_Database_Migrations_ActionMeta extends NF_Abstracts_Migration
[2] Fix | Delete
{
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* Constructor method for the NF_Database_Migrations_ActionMeta class.
[6] Fix | Delete
*
[7] Fix | Delete
* @since 3.0.0
[8] Fix | Delete
*/
[9] Fix | Delete
public function __construct()
[10] Fix | Delete
{
[11] Fix | Delete
parent::__construct(
[12] Fix | Delete
'nf3_action_meta',
[13] Fix | Delete
'nf_migration_create_table_action_meta'
[14] Fix | Delete
);
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Function to run our initial migration.
[20] Fix | Delete
*
[21] Fix | Delete
* @since 3.0.0
[22] Fix | Delete
*
[23] Fix | Delete
* @updated 3.4.0
[24] Fix | Delete
*/
[25] Fix | Delete
public function run()
[26] Fix | Delete
{
[27] Fix | Delete
$query = "CREATE TABLE IF NOT EXISTS {$this->table_name()} (
[28] Fix | Delete
`id` int NOT NULL AUTO_INCREMENT,
[29] Fix | Delete
`parent_id` int NOT NULL,
[30] Fix | Delete
`key` longtext NOT NULL,
[31] Fix | Delete
`value` longtext,
[32] Fix | Delete
`meta_key` longtext,
[33] Fix | Delete
`meta_value` longtext,
[34] Fix | Delete
UNIQUE KEY (`id`)
[35] Fix | Delete
) {$this->charset_collate( true )};";
[36] Fix | Delete
[37] Fix | Delete
dbDelta( $query );
[38] Fix | Delete
}
[39] Fix | Delete
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Function to be run as part of our CacheCollateActions required update.
[43] Fix | Delete
*
[44] Fix | Delete
* @since 3.3.12
[45] Fix | Delete
*
[46] Fix | Delete
* @updated 3.4.0
[47] Fix | Delete
*/
[48] Fix | Delete
public function cache_collate_actions()
[49] Fix | Delete
{
[50] Fix | Delete
// If the meta_key column has not already been defined...
[51] Fix | Delete
if ( ! $this->column_exists( 'meta_key' ) ) {
[52] Fix | Delete
global $wpdb;
[53] Fix | Delete
// Modify our table.
[54] Fix | Delete
$query = "ALTER TABLE {$this->table_name()}
[55] Fix | Delete
ADD `meta_key` longtext {$this->charset_collate()},
[56] Fix | Delete
ADD `meta_value` longtext {$this->charset_collate()};";
[57] Fix | Delete
[58] Fix | Delete
$wpdb->query( $query );
[59] Fix | Delete
}
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function