<?php if ( ! defined( 'ABSPATH' ) ) exit;
class NF_Database_Migrations_Actions extends NF_Abstracts_Migration
* Constructor method for the NF_Database_Migrations_Actions class.
public function __construct()
'nf_migration_create_table_actions'
* Function to run our initial migration.
$query = "CREATE TABLE IF NOT EXISTS {$this->table_name()} (
`id` int NOT NULL AUTO_INCREMENT,
`active` boolean DEFAULT TRUE,
`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 label column has not already been defined...
if ( ! $this->column_exists( 'label' ) ) {
$query = "ALTER TABLE {$this->table_name()}
ADD `label` longtext {$this->charset_collate()},
MODIFY `type` longtext {$this->charset_collate()};";