Not able to create plugin tables since WP 2.5
-
Hi all,
I am trying to update my plugin for compatibility with WP 2.5 but I still cannot create the tables at activation.
Here is the code I use to create the tables:
// Create the main template table $sql = "CREATE TABLE ".$post_templates_templates_table." ( template_id BIGINT(20) NOT NULL AUTO_INCREMENT, type ENUM('page', 'post') NOT NULL, title TEXT NOT NULL, slug VARCHAR(200) NOT NULL, content LONGTEXT NOT NULL, excerpt TEXT NOT NULL, categories TEXT NOT NULL, tags TEXT NOT NULL, password VARCHAR(20) NOT NULL, comment_status ENUM('open', 'closed', 'registered_only') NOT NULL, ping_status ENUM('open', 'closed') NOT NULL, to_ping TEXT NOT NULL, parent BIGINT(20) NOT NULL, PRIMARY KEY (template_id) ); "; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql);
This was working fine with WP 2.3.
I tried as well to create the tables manually with a $wpdb->query but I have the same effect.
I got no output message, no way to know why it does not get created. Do I have to commit such a DB modification? If so, how?
Vincent
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Not able to create plugin tables since WP 2.5’ is closed to new replies.