my last post got me wondering why there wasn’t an auto_incrementing field. that seemed highly unusual; in fact, according to this…wp_postmeta should not have any 0’s in the meta_id field since it is supposed to be an auto-incrementing field. i lost my indexes somewhere.
and, adding the indexes back fixes it! here are the queries i used if it helps anyone that somehow lost their indexes as well.
alter table wp_postmeta change column meta_id id integer unsigned, add column meta_id integer unsigned primary key auto_increment first; update wp_postmeta set meta_id = meta_id + 9000; -- more than the number of rows in the table update wp_postmeta set meta_id = id where id <> 0; alter table wp_postmeta drop column id; alter table wp_postmeta add index (meta_key), add index (post_id);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.