: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php if ( ! defined( 'ABSPATH' ) ) exit;
class NF_Database_Migrations_Upgrades extends NF_Abstracts_Migration
* Constructor method for the NF_Database_Migrations_Fields class.
public function __construct()
'nf_migration_create_table_upgrades'
* Function to run our initial migration.
$query = "CREATE TABLE IF NOT EXISTS {$this->table_name()} (
`stage` INT(11) NOT NULL DEFAULT 0,
`maintenance` bit DEFAULT 0,
) {$this->charset_collate( true )};";
* Function to define our maintenance column.
public function cache_collate_fields()
// If the maintenance column has not already been defined...
if ( ! $this->column_exists( 'maintenance' ) ) {
$query = "ALTER TABLE {$this->table_name()}
ADD `maintenance` bit DEFAULT 0;";