"TEXT DEFAULT NULL AFTER `config_update_details`", 'config_managed' => "MEDIUMTEXT DEFAULT NULL AFTER `config_manager_keys`", ] as $itflow_column => $itflow_definition) { $itflow_column_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'settings' AND COLUMN_NAME = '$itflow_column' LIMIT 1"); if (!$itflow_column_exists || mysqli_num_rows($itflow_column_exists) === 0) { mysqli_query($mysqli, "ALTER TABLE `settings` ADD `$itflow_column` $itflow_definition"); } } unset($itflow_column, $itflow_definition, $itflow_column_exists);