<?php if ( ! defined( 'ABSPATH' ) ) exit;
class NF_Database_Migrations_Objects extends NF_Abstracts_Migration
* Constructor method for the NF_Database_Migrations_Objects class.
public function __construct()
'nf_migration_create_table_objects'
* Function to run our initial migration.
$query = "CREATE TABLE IF NOT EXISTS {$this->table_name()} (
`id` int NOT NULL AUTO_INCREMENT,
) {$this->charset_collate( true )};";
* Function to ensure proper collation of the objects table.
public function cache_collate_objects()
// If the object_title column has not already been defined...
if ( ! $this->column_exists( 'object_title' ) ) {
$query = "ALTER TABLE {$this->table_name()}
ADD `object_title` longtext {$this->charset_collate()},
MODIFY `type` longtext {$this->charset_collate()};";