<?php if ( ! defined( 'ABSPATH' ) ) exit;
class NF_Database_Migrations_ActionMeta extends NF_Abstracts_Migration
* Constructor method for the NF_Database_Migrations_ActionMeta class.
public function __construct()
'nf_migration_create_table_action_meta'
* Function to run our initial migration.
$query = "CREATE TABLE IF NOT EXISTS {$this->table_name()} (
`id` int NOT NULL AUTO_INCREMENT,
`parent_id` int NOT NULL,
) {$this->charset_collate( true )};";
* Function to be run as part of our CacheCollateActions required update.
public function cache_collate_actions()
// If the meta_key column has not already been defined...
if ( ! $this->column_exists( 'meta_key' ) ) {
$query = "ALTER TABLE {$this->table_name()}
ADD `meta_key` longtext {$this->charset_collate()},
ADD `meta_value` longtext {$this->charset_collate()};";