You can run this statement on your database to create the table. Replace -DB_PREFIX- with your wordpress table prefix.
CREATE TABLE -DB_PREFIX-po_plugins (
pl_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
post_id bigint(20) unsigned NOT NULL,
permalink longtext NOT NULL,
permalink_hash varchar(32) NOT NULL default '',
permalink_hash_args varchar(32) NOT NULL default '',
post_type varchar(255) NOT NULL default '',
status varchar(20) NOT NULL default 'publish',
secure int(1) NOT NULL default 0,
children int(1) NOT NULL default 0,
pt_override int(1) NOT NULL default 0,
disabled_plugins longtext NOT NULL,
enabled_plugins longtext NOT NULL,
disabled_mobile_plugins longtext NOT NULL,
enabled_mobile_plugins longtext NOT NULL,
disabled_groups longtext NOT NULL,
enabled_groups longtext NOT NULL,
disabled_mobile_groups longtext NOT NULL,
enabled_mobile_groups longtext NOT NULL,
post_priority int(3) NOT NULL default 0,
dir_count int(3) NOT NULL default 0,
user_role varchar(255) NOT NULL default '_',
PRIMARY KEY (pl_id),
KEY PO_post_id (post_id),
KEY PO_permalink_idx (permalink_hash,status,secure,post_type,user_role),
KEY PO_permalink_args_idx (permalink_hash_args,status,secure,post_type,user_role),
KEY PO_page_lists (post_id,post_type,user_role)
);
Hello Jeff, thanks for your help,
I have the same problem with your plugin
I have tried to create the table (with my wordpress table prefix) but I have the error:
Erreur
Requête SQL :
CREATE TABLE lfX_po_plugins (
pl_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
post_id bigint(20) unsigned NOT NULL,
permalink longtext NOT NULL,
permalink_hash varchar(32) NOT NULL default ”,
permalink_hash_args varchar(32) NOT NULL default ”,
post_type varchar(255) NOT NULL default ”,
status varchar(20) NOT NULL default ‘publish’,
secure int(1) NOT NULL default 0,
children int(1) NOT NULL default 0,
pt_override int(1) NOT NULL default 0,
disabled_plugins longtext NOT NULL,
enabled_plugins longtext NOT NULL,
disabled_mobile_plugins longtext NOT NULL,
enabled_mobile_plugins longtext NOT NULL,
disabled_groups longtext NOT NULL,
enabled_groups longtext NOT NULL,
disabled_mobile_groups longtext NOT NULL,
enabled_mobile_groups longtext NOT NULL,
post_priority int(3) NOT NULL default 0,
dir_count int(3) NOT NULL default 0,
user_role varchar(255) NOT NULL default ‘_’,
PRIMARY KEY (pl_id),
KEY PO_[…]
MySQL answers: Documentation
#1071 – Specified key was too long; max key length is 1000 bytes
Any idea?
Thanks,
Regards,
Dax
Thread Starter
terng
(@terng)
I got the same error as @disconance.
I don’t see a key in the statement that is more than 1000 bytes long?????
The biggest key I see is 566 bytes.
Hi again Jeff,
I don’t understand what’s happen, I have tried again today and same result.
Thanks,
Regards,
DAX
Thread Starter
terng
(@terng)
I tested changing the varchar length and found out that my varchar use 3 bytes per length. The collation of the fields are utf8_unicode_ci.
It will be possible if I changed to varchar(140) for post_type and user_role. Do you recommend doing this?
You can change the length of those fields without causing problems. The only way that would cause a problem is if you had a post type or role name longer than that.
-
This reply was modified 8 years, 11 months ago by
Jeff Sterup.
You can also change your collation to something like utf8_general.
Try installing version 9.1.2. I changed the size of the post_type and user_role. The post_type column is only varchar(20) in the posts table. I was just future proofing the plugin. I set the user_role column to varchar(100) which could possibly be bigger than 100 characters but it isn’t likely. That would be a really long role name.
Hi Jeff, with the update it works, Thank you very much for your work!
Regards,
Dax
Thread Starter
terng
(@terng)
The new version works well.
Thank you. 🙂