I am presently writing a wordpress plugin for any customer, even though it's often working good, I discovered that dbDelta doesn't let me produce the table I want on wordpress plugin activation.

I am running the below code to bind the activation function:

register_activation_hook(__FILE__, 'adminInstallation');

Which is the function itself:

function adminInstallation(){
    global $wpdb;

    $objectEquipment = 'wp_object_equipment';
    $equipmentSQL = "CREATE TABLE ".$objectEquipment." (
                    id mediumint(9) NOT NULL AUTO_INCREMENT,
                    name tinytext NOT NULL
                );";

    require_once(ABSPATH.'wp-admin/includes/upgrade.php');
    $equipment = dbDelta($equipmentSQL);
}

Once it has been run, I'm checking the database, but no tables happen to be added. Attempting to dump the mistake is only going to lead to Wordpress saying there is unpredicted output, however it wont allow me to begin to see the actual message the server returns. This problem continues to be annoying me for many hrs, and that i cant continue until it's solved. Does anybody here have idea why it could do that?

So far as I will tell, all of the code applies, which is the 3rd wordpress plugin I have written. I even attempted while using code from the previous ones, but that didn't work either.

EDIT: I attempted running the function following the wordpress plugin activation and dump the dbDelta response. It reviews the table continues to be produced, but nonetheless, there is nothing new within the database. Any ideas?

Thanks ahead of time! // Jonathan

I know that dbDelta is extremely particular concerning the formatting. In my opinion the problem is that you're not using backticks (`) around database parts. Try the next.

On the side note, wouldn't hurt to designate a principal key.

$equipmentSQL = "CREATE TABLE `".$objectEquipment."` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `name` tinytext NOT NULL,
  PRIMARY KEY (`id`)
);";