Skip to content

2 Comments

  1. superdba at large
    December 18, 2019 @ 4:59 pm

    would you comment how you would deal with database tables without primary keys? there seems to be a lot of such tables in wordpress.
    this seems to be a design defect of wordpress – since all databases should have a primary key for performance and identification purpose
    https://www.percona.com/doc/percona-xtradb-cluster/LATEST/features/pxc-strict-mode.html
    https://stackoverflow.com/questions/2515596/can-a-database-table-be-without-a-primary-key

    Reply

    • Dave H.
      December 19, 2019 @ 6:28 pm

      Either add a primary key to tables where a PK doesn’t exist or don’t use strict mode. It’s extra tables created by plugins that are the culprit here, and almost always there’s an obvious primary key that can be added and if not then a composite primary key can be created which guarantees uniqueness.

      Reply

Leave a Reply

Your email address will not be published.

Join me on Discord for Q&A and get a 20% discount coupon - Dave Hilditch, WP Intense